svn commit: samba r12392 - in trunk/source/utils: .
jra at samba.org
jra at samba.org
Tue Dec 20 01:15:12 GMT 2005
Author: jra
Date: 2005-12-20 01:15:06 +0000 (Tue, 20 Dec 2005)
New Revision: 12392
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12392
Log:
Refuse sharenames that are also usernames.
Jeremy.
Modified:
trunk/source/utils/net_usershare.c
Changeset:
Modified: trunk/source/utils/net_usershare.c
===================================================================
--- trunk/source/utils/net_usershare.c 2005-12-20 00:55:28 UTC (rev 12391)
+++ trunk/source/utils/net_usershare.c 2005-12-20 01:15:06 UTC (rev 12392)
@@ -151,6 +151,13 @@
return -1;
}
+ /* Disallow shares the same as users. */
+ if (getpwnam(sharename)) {
+ d_printf("net usershare add: share name %s is already a valid system user name\n",
+ sharename );
+ return -1;
+ }
+
/* Construct the full path for the usershare file. */
get_basepath(full_path);
pstrcat(full_path, "/");
More information about the samba-cvs
mailing list