Adding a feature to the smbd

Thomas Langås tlan at stud.ntnu.no
Thu Jan 25 18:04:43 GMT 2001


Richard Sharpe:
> >Well, I've found it on the manpage!
> >
> >man smb.conf
> >/source environment
> No, we mean %$(envar) ... It is not where it should be. I have just
> committed a fix to the smb.conf manpage source.
> 

Ok, what's wrong with this (from my share.conf-file):
[protst]
        source environment = |/usr/local/samba/bin/returnpath.sh %I
        path = %${PROFILE_PATH}

This is the script:
-rwxrwxr-x   1 root     root         390 Jan 25 18:39 returnpath.sh

[script start]
#!/bin/bash

ip=$1
ip=${ip%.*}
case $ip in
  129.241.56)
        myENV=%H/.profil
        ;;
  129.241.151)
        myENV=%H/privat
        ;;
  *)
        myENV=%H
        ;;
esac

/usr/bin/echo PROFILE_PATH=$myENV

exit 0;
[script end]

I can't seem to find any errors here, but trying to mount this from my
windows-box gives me an error... However mounting a share with my enhanced
path-patch instead, works like a dream. Is there something I'm missing?

-- 
-Thomas




More information about the samba-technical mailing list