Fix coverity CID: 932 - forward null.
authorJeremy Allison <jra@samba.org>
Fri, 21 Aug 2009 23:17:17 +0000 (16:17 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 21 Aug 2009 23:17:17 +0000 (16:17 -0700)
Jeremy.

source3/smbd/share_access.c

index 5d779b9c8115878382f13cb57586fc3d2db5e71f..a300d6f1de96d72d78c87df0bf7b89a053cb3341 100644 (file)
@@ -130,8 +130,10 @@ static bool token_contains_name(TALLOC_CTX *mem_ctx,
                        continue;
                }
                if (*prefix == '&') {
-                       if (user_in_netgroup(sconn, username, name)) {
-                               return True;
+                       if (username) {
+                               if (user_in_netgroup(sconn, username, name)) {
+                                       return True;
+                               }
                        }
                        continue;
                }