From a6676764a855a63828fb7c4997a7fd7f38ba7cff Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 27 Jan 2004 15:28:59 +0000 Subject: 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) --- source3/smbd/password.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3') 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; } -- cgit