ipc.c: Added ERROR_MORE_DATA error if client buffer too small.
authorJeremy Allison <jra@samba.org>
Wed, 8 Oct 1997 00:21:39 +0000 (00:21 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 8 Oct 1997 00:21:39 +0000 (00:21 +0000)
server.c: Allow admin_user on read only shares. I think this is
safe but it needs looking at.
Jeremy (jallison@whistle.com)

source/smbd/ipc.c
source/smbd/server.c

index b9355c4ec07dcb158226555de8419545f6e150cd..6da9562c9f4c98b085578e24e30120125cba131f 100644 (file)
@@ -1074,7 +1074,7 @@ static BOOL api_RNetServerEnum(int cnum, uint16 vuid, char *param, char *data,
   
   *rparam_len = 8;
   *rparam = REALLOC(*rparam,*rparam_len);
-  SSVAL(*rparam,0,NERR_Success);
+  SSVAL(*rparam,0,(missed == 0 ? NERR_Success : ERROR_MORE_DATA));
   SSVAL(*rparam,2,0);
   SSVAL(*rparam,4,counted);
   SSVAL(*rparam,6,counted+missed);
index 92c219c71b3d844db750b6e136e0550ec97a97c5..290181fb9ee04f7b198b905fea72fa050d524d72 100644 (file)
@@ -3167,8 +3167,17 @@ int make_connection(char *service,char *user,char *password, int pwlen, char *de
   }
 
   /* admin user check */
-  if (user_in_list(user,lp_admin_users(snum)) &&
-      !pcon->read_only)
+
+  /* JRA - original code denied admin user if the share was
+     marked read_only. Changed as I don't think this is needed,
+     but old code left in case there is a problem here.
+   */
+  if (user_in_list(user,lp_admin_users(snum)) 
+#if 0
+      && !pcon->read_only)
+#else
+      )
+#endif
     {
       pcon->admin_user = True;
       DEBUG(0,("%s logged in as admin user (root privileges)\n",user));