Start to tidy-up check_user_ok().
authorJeremy Allison <jra@samba.org>
Thu, 20 Dec 2012 19:50:25 +0000 (11:50 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Jan 2013 18:03:27 +0000 (19:03 +0100)
Now we have removed "security=share" we cannot be
called with vuid == UID_FIELD_INVALID.

Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f0450e0d80c2ff56c4834b2f1271a7f84132ca5b)

source3/smbd/uid.c

index 30c7154a1438c673189500e17a4b8a5fe37d1a7a..2aa9fff34bb998b87049edb0db57bc51b8a654d7 100644 (file)
@@ -90,12 +90,11 @@ static bool check_user_ok(connection_struct *conn,
                        const struct auth_session_info *session_info,
                        int snum)
 {
-       bool valid_vuid = (vuid != UID_FIELD_INVALID);
        unsigned int i;
        bool readonly_share;
        bool admin_user;
 
-       if (valid_vuid) {
+       {
                struct vuid_cache_entry *ent;
 
                for (i=0; i<VUID_CACHE_SIZE; i++) {
@@ -145,7 +144,7 @@ static bool check_user_ok(connection_struct *conn,
                session_info->info->domain_name,
                NULL, session_info->security_token, lp_admin_users(snum));
 
-       if (valid_vuid) {
+       {
                struct vuid_cache_entry *ent =
                        &conn->vuid_cache.array[conn->vuid_cache.next_entry];