The branch, v3-6-test has been updated
       via  baac32c s3-passdb: Fix negative SID->uid/gid cache handling. (bug 
#8952)
      from  96b6f3a s3-auth: Don't lookup the system user in pdb.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit baac32c43460ed5e78e7f8bb2304f79cae2b15ef
Author: Ira Cooper <[email protected]>
Date:   Wed May 23 21:39:03 2012 -0400

    s3-passdb: Fix negative SID->uid/gid cache handling. (bug #8952)
    
    -1 uid/gid signals a non existent uid/gid.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 source3/passdb/lookup_sid.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 5cf391f..2afa86e 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -1490,7 +1490,24 @@ bool sids_to_unix_ids(const struct dom_sid *sids, 
uint32_t num_sids,
                        continue;
                }
        }
+
 done:
+       for (i=0; i<num_sids; i++) {
+               switch(ids[i].type) {
+               case WBC_ID_TYPE_GID:
+                       if (ids[i].id.gid == (gid_t)-1) {
+                               ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED;
+                       }
+                       break;
+               case WBC_ID_TYPE_UID:
+                       if (ids[i].id.uid == (uid_t)-1) {
+                               ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED;
+                       }
+                       break;
+               case WBC_ID_TYPE_NOT_SPECIFIED:
+                       break;
+               }
+       }
        ret = true;
 fail:
        TALLOC_FREE(wbc_ids);


-- 
Samba Shared Repository

Reply via email to