summaryrefslogtreecommitdiff
path: root/source3/smbwrapper/smbsh.in
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@samba.org>1998-10-04 22:42:05 +0000
committerAlexandre Oliva <oliva@samba.org>1998-10-04 22:42:05 +0000
commit06eaf71e433bf0970e86f2389842637089805346 (patch)
tree7c2616bfce1ecf7337c30264e0993219a1ddb6cf /source3/smbwrapper/smbsh.in
parent11c5c17668c13e3233435e59d3392de30e40feb2 (diff)
downloadsamba-06eaf71e433bf0970e86f2389842637089805346.tar.gz
samba-06eaf71e433bf0970e86f2389842637089805346.tar.bz2
samba-06eaf71e433bf0970e86f2389842637089805346.zip
bin/cvsignore: deleted, so that bin can be removed from the repository
.cvsignore: added bin; it is no longer part of the source tree smbwrapper/smbsh: now auto-generated from smbsh.in smbwrapper/.cvsignore: added smbsh configure.in: generate @builddir@ configure, include/stamp-h.in: regen Makefile.in: new target `smbwrapper'; sped up directory creation (This used to be commit 8f95ee8fc32d74f20cca489ecd3f7e34e773db2f)
Diffstat (limited to 'source3/smbwrapper/smbsh.in')
-rw-r--r--source3/smbwrapper/smbsh.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/source3/smbwrapper/smbsh.in b/source3/smbwrapper/smbsh.in
new file mode 100644
index 0000000000..f5a5614842
--- /dev/null
+++ b/source3/smbwrapper/smbsh.in
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
+
+if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
+ echo You need to set LIBDIR in smbsh
+ exit
+fi
+
+# a simple launcher for the smbwrapper.so preloadde library
+
+if [ x"${SMBW_USER+set}" != x"set" ]; then
+ echo username?
+ read user
+ SMBW_USER=$user
+ export SMBW_USER
+fi
+
+# this doesn't hide the password - we need a proper launch app for that
+if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then
+ echo password?
+ read pass
+ SMBW_PASSWORD=$pass
+ export SMBW_PASSWORD
+fi
+
+PWD=`pwd`
+export PWD
+PS1='smbsh$ '
+export PS1
+
+LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so
+export LD_PRELOAD
+
+exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"}