1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/source3/smbwrapper/smbsh.in
Alexandre Oliva 06eaf71e43 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 8f95ee8fc3)
1998-10-04 22:42:05 +00:00

36 lines
700 B
Bash

#! /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+"$@"}