summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-10-08 00:21:39 +0000
committerJeremy Allison <jra@samba.org>1997-10-08 00:21:39 +0000
commitcc50955a2760f1de7e80b91408a7c0806f6eb44c (patch)
treed30e2e129370efc6f5a22138158e46f4d46db29b /source
parent707d0ec388c0045938f367e1d17919bfc8637fea (diff)
downloadsamba-cc50955a2760f1de7e80b91408a7c0806f6eb44c.tar.gz
samba-cc50955a2760f1de7e80b91408a7c0806f6eb44c.tar.xz
samba-cc50955a2760f1de7e80b91408a7c0806f6eb44c.zip
ipc.c: Added ERROR_MORE_DATA error if client buffer too small.
server.c: Allow admin_user on read only shares. I think this is safe but it needs looking at. Jeremy (jallison@whistle.com)
Diffstat (limited to 'source')
-rw-r--r--source/smbd/ipc.c2
-rw-r--r--source/smbd/server.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index b9355c4ec07..6da9562c9f4 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -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);
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 92c219c71b3..290181fb9ee 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -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));