Tidy up winbindd debug. Added Bill Moran's hide unreadable fix.
authorJeremy Allison <jra@samba.org>
Sat, 13 Apr 2002 02:24:07 +0000 (02:24 +0000)
committerJeremy Allison <jra@samba.org>
Sat, 13 Apr 2002 02:24:07 +0000 (02:24 +0000)
Jeremy.
(This used to be commit a9895fcb30cdcb572cd254b0d370d79f95c7214d)

source3/nsswitch/winbindd.c
source3/smbd/dir.c

index e9ee2a76933710af7ba6ebee19d3dbf3d215cdca..479be795744b0b75ff5c034f7f8f155c1c01c651 100644 (file)
@@ -397,11 +397,8 @@ static void client_read(struct winbindd_cli_state *state)
 
        } while (n == -1 && errno == EINTR);
        
-       DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len ));
-
-       /* Read failed, kill client */
-       
        if (n == -1 || n == 0) {
+               /* Read failed, kill client */
                DEBUG(5,("read failed on sock %d, pid %d: %s\n",
                         state->sock, state->pid, 
                         (n == -1) ? strerror(errno) : "EOF"));
@@ -410,6 +407,8 @@ static void client_read(struct winbindd_cli_state *state)
                return;
        }
        
+       DEBUG(10,("client_read: read %d bytes. Need %d more for a full request.\n", n, sizeof(state->request) - n - state->read_buf_len ));
+
        /* Update client state */
        
        state->read_buf_len += n;
index f56e0e9ef00a000df96c0cad0a1c2aaff0be9ae4..d224e4bdbe8f70d0ab104d504d19088d0e6496b7 100644 (file)
@@ -680,7 +680,15 @@ static BOOL user_can_read_file(connection_struct *conn, char *name)
 
        ZERO_STRUCT(ste);
 
-       /* if we can't stat it does not show it */
+       /*
+        * If user is a member of the Admin group
+        * we never hide files from them.
+        */
+
+       if (conn->admin_user)
+               return True;
+
+       /* If we can't stat it does not show it */
        if (vfs_stat(conn, name, &ste) != 0)
                return False;