diff options
author | Gerald Carter <jerry@samba.org> | 2004-01-27 15:28:59 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-01-27 15:28:59 +0000 |
commit | a6676764a855a63828fb7c4997a7fd7f38ba7cff (patch) | |
tree | fe60f3523d9e5faf9a924d5ed40bf24b5d21643a /source3/smbd/password.c | |
parent | 40fced520587a23bb3704d02af82424ae694c31f (diff) | |
download | samba-a6676764a855a63828fb7c4997a7fd7f38ba7cff.tar.gz samba-a6676764a855a63828fb7c4997a7fd7f38ba7cff.tar.bz2 samba-a6676764a855a63828fb7c4997a7fd7f38ba7cff.zip |
bug 977 - don't create a homes share for a user if a static share already exists by the same name
(This used to be commit e589f6502fc280d5f89b399c6cef167e26773062)
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 494d9ecd43..36e3fb4738 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -254,7 +254,13 @@ int register_vuid(auth_serversupplied_info *server_info, DATA_BLOB session_key, if ((!vuser->guest) && vuser->unix_homedir && *(vuser->unix_homedir)) { DEBUG(3, ("Adding/updating homes service for user '%s' using home directory: '%s'\n", vuser->user.unix_name, vuser->unix_homedir)); - vuser->homes_snum = add_home_service(vuser->user.unix_name, vuser->user.unix_name, vuser->unix_homedir); + + /* only add the home directory if there doesn't exist a static share by that name */ + if ( lp_servicenumber(vuser->user.unix_name) == -1 ) { + vuser->homes_snum = add_home_service(vuser->user.unix_name, + vuser->user.unix_name, vuser->unix_homedir); + } + } else { vuser->homes_snum = -1; } |