summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-01-27 15:28:33 +0000
committerGerald Carter <jerry@samba.org>2004-01-27 15:28:33 +0000
commitf104d75026957981b944b52eb33f7947f4b42fb8 (patch)
tree79330a03c68c114dc29c6253c70221f47ce35871 /source3
parente2d301accfc0977fa3c647900b5e1e2315c3f639 (diff)
downloadsamba-f104d75026957981b944b52eb33f7947f4b42fb8.tar.gz
samba-f104d75026957981b944b52eb33f7947f4b42fb8.tar.bz2
samba-f104d75026957981b944b52eb33f7947f4b42fb8.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 6b89a76aa7efaa0ad7a0139aeb3e4ebf5c01cdcb)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/password.c8
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;
}