Author: gd
Date: 2005-09-16 13:01:25 +0000 (Fri, 16 Sep 2005)
New Revision: 10262

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10262

Log:
* Fix for getgrnam not returning builtin group (which is done by getent
group)
* Give a better debug message when returning builtin groups.

Guenther


Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
   trunk/source/nsswitch/winbindd_group.c
   trunk/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2005-09-16 12:50:24 UTC 
(rev 10261)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2005-09-16 13:01:25 UTC 
(rev 10262)
@@ -259,9 +259,10 @@
 
        if ( !((name_type==SID_NAME_DOM_GRP) ||
               ((name_type==SID_NAME_ALIAS) && domain->primary) ||
-              ((name_type==SID_NAME_ALIAS) && domain->internal)) )
+              ((name_type==SID_NAME_ALIAS) && domain->internal) ||
+              ((name_type==SID_NAME_WKN_GRP) && domain->internal)) )
        {
-               DEBUG(1, ("name '%s' is not a local or domain group: %d\n", 
+               DEBUG(1, ("name '%s' is not a local, domain or builtin group: 
%d\n", 
                          name_group, name_type));
                request_error(state);
                return;
@@ -518,7 +519,8 @@
        if ( ( lp_security() != SEC_ADS && domain->native_mode 
                && domain->primary) || domain->internal )
        {
-               DEBUG(4,("get_sam_group_entries: Native Mode 2k domain; 
enumerating local groups as well\n"));
+               DEBUG(4,("get_sam_group_entries: %s domain; enumerating local 
groups as well\n", 
+                       domain->native ? "Native Mode 2k":"BUILTIN"));
                
                status = domain->methods->enum_local_groups(domain, mem_ctx, 
&num_entries, &sam_grp_entries);
                

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2005-09-16 12:50:24 UTC 
(rev 10261)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c  2005-09-16 13:01:25 UTC 
(rev 10262)
@@ -805,7 +805,7 @@
        return False;
 }
 
-/* Parse a string of the form DOMAIN/user into a domain and a user */
+/* Parse a string of the form DOMAIN\user into a domain and a user */
 
 BOOL parse_domain_user(const char *domuser, fstring domain, fstring user)
 {

Modified: trunk/source/nsswitch/winbindd_group.c
===================================================================
--- trunk/source/nsswitch/winbindd_group.c      2005-09-16 12:50:24 UTC (rev 
10261)
+++ trunk/source/nsswitch/winbindd_group.c      2005-09-16 13:01:25 UTC (rev 
10262)
@@ -259,9 +259,10 @@
 
        if ( !((name_type==SID_NAME_DOM_GRP) ||
               ((name_type==SID_NAME_ALIAS) && domain->primary) ||
-              ((name_type==SID_NAME_ALIAS) && domain->internal)) )
+              ((name_type==SID_NAME_ALIAS) && domain->internal) ||
+              ((name_type==SID_NAME_WKN_GRP) && domain->internal)) )
        {
-               DEBUG(1, ("name '%s' is not a local or domain group: %d\n", 
+               DEBUG(1, ("name '%s' is not a local, domain or builtin group: 
%d\n", 
                          name_group, name_type));
                request_error(state);
                return;
@@ -518,7 +519,8 @@
        if ( ( lp_security() != SEC_ADS && domain->native_mode 
                && domain->primary) || domain->internal )
        {
-               DEBUG(4,("get_sam_group_entries: Native Mode 2k domain; 
enumerating local groups as well\n"));
+               DEBUG(4,("get_sam_group_entries: %s domain; enumerating local 
groups as well\n", 
+                       domain->native ? "Native Mode 2k":"BUILTIN"));
                
                status = domain->methods->enum_local_groups(domain, mem_ctx, 
&num_entries, &sam_grp_entries);
                

Modified: trunk/source/nsswitch/winbindd_util.c
===================================================================
--- trunk/source/nsswitch/winbindd_util.c       2005-09-16 12:50:24 UTC (rev 
10261)
+++ trunk/source/nsswitch/winbindd_util.c       2005-09-16 13:01:25 UTC (rev 
10262)
@@ -805,7 +805,7 @@
        return False;
 }
 
-/* Parse a string of the form DOMAIN/user into a domain and a user */
+/* Parse a string of the form DOMAIN\user into a domain and a user */
 
 BOOL parse_domain_user(const char *domuser, fstring domain, fstring user)
 {

Reply via email to