svn commit: samba r17813 - in branches: SAMBA_3_0/source/passdb
SAMBA_3_0_23/source/passdb
jerry at samba.org
jerry at samba.org
Thu Aug 24 22:05:53 GMT 2006
Author: jerry
Date: 2006-08-24 22:05:53 +0000 (Thu, 24 Aug 2006)
New Revision: 17813
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17813
Log:
Remove another instance of manually setting the group SID.
The would have been primaryly used when adding a user to
an smbpasswd file, but could have been introduce to other
backends by using pdbedit -i -e.
The symptom was
[2006/08/09 13:07:43, 0] rpc_parse/parse_samr.c:init_sam_user_info21A(6276)
init_sam_user_info_21A: User nobody has Primary Group SID S-1-22-2-99,
which conflicts with the domain sid S-1-5-21-1825997848-4107600307-1754506280.
Failing operation.
Modified:
branches/SAMBA_3_0/source/passdb/passdb.c
branches/SAMBA_3_0_23/source/passdb/passdb.c
Changeset:
Modified: branches/SAMBA_3_0/source/passdb/passdb.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/passdb.c 2006-08-24 21:37:10 UTC (rev 17812)
+++ branches/SAMBA_3_0/source/passdb/passdb.c 2006-08-24 22:05:53 UTC (rev 17813)
@@ -136,7 +136,6 @@
{
const char *guest_account = lp_guestaccount();
const char *domain = global_myname();
- DOM_SID group_sid;
uint32 urid;
if ( !pwd ) {
@@ -148,8 +147,15 @@
pdb_set_username(user, pwd->pw_name, PDB_SET);
pdb_set_fullname(user, pwd->pw_gecos, PDB_SET);
pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT);
+#if 0
+ /* This can lead to a primary group of S-1-22-2-XX which
+ will be rejected by other parts of the Samba code.
+ Rely on pdb_get_group_sid() to "Do The Right Thing" (TM)
+ --jerry */
+
gid_to_sid(&group_sid, pwd->pw_gid);
pdb_set_group_sid(user, &group_sid, PDB_SET);
+#endif
/* save the password structure for later use */
Modified: branches/SAMBA_3_0_23/source/passdb/passdb.c
===================================================================
--- branches/SAMBA_3_0_23/source/passdb/passdb.c 2006-08-24 21:37:10 UTC (rev 17812)
+++ branches/SAMBA_3_0_23/source/passdb/passdb.c 2006-08-24 22:05:53 UTC (rev 17813)
@@ -136,7 +136,6 @@
{
const char *guest_account = lp_guestaccount();
const char *domain = global_myname();
- DOM_SID group_sid;
uint32 urid;
if ( !pwd ) {
@@ -148,8 +147,15 @@
pdb_set_username(user, pwd->pw_name, PDB_SET);
pdb_set_fullname(user, pwd->pw_gecos, PDB_SET);
pdb_set_domain (user, get_global_sam_name(), PDB_DEFAULT);
+#if 0
+ /* This can lead to a primary group of S-1-22-2-XX which
+ will be rejected by other parts of the Samba code.
+ Rely on pdb_get_group_sid() to "Do The Right Thing" (TM)
+ --jerry */
+
gid_to_sid(&group_sid, pwd->pw_gid);
pdb_set_group_sid(user, &group_sid, PDB_SET);
+#endif
/* save the password structure for later use */
More information about the samba-cvs
mailing list