summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-17 14:27:12 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-17 14:27:12 +0000
commitefb8113d00a4513c1115640004c0905465d3b673 (patch)
tree13823188f1f1b05a4861611a806109d2281e6479 /source3/smbd/server.c
parente351461e094a14caed31b7eae37e39d935d30561 (diff)
downloadsamba-efb8113d00a4513c1115640004c0905465d3b673.tar.gz
samba-efb8113d00a4513c1115640004c0905465d3b673.tar.bz2
samba-efb8113d00a4513c1115640004c0905465d3b673.zip
- made FAST_SHARE_MODES standard for Linux
- you can now press enter after a password prompt with "smbclient -L hostname" and it will use a blank username and password, the same as if you used -U% - changed the wins.dat store code to not go via a string variable (just use fprintf instead) - removed a "unsigned long" that luke put back in, changing it to uint32 to keep 64 bit machines happy. Naughtly luke! - allow guest non-connnected print queue listings so ms client 3 can work (This used to be commit 917160dee69bbc198985b6f3232ca2dcda809d8a)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 3889440975..403b41e86b 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -3026,7 +3026,7 @@ struct smb_message_struct
{SMBctemp,"SMBctemp",reply_ctemp,AS_USER},
{SMBsplopen,"SMBsplopen",reply_printopen,AS_USER},
{SMBsplclose,"SMBsplclose",reply_printclose,AS_USER},
- {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER},
+ {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER|AS_GUEST},
{SMBsplwr,"SMBsplwr",reply_printwrite,AS_USER},
{SMBlock,"SMBlock",reply_lock,AS_USER},
{SMBunlock,"SMBunlock",reply_unlock,AS_USER},
@@ -3159,8 +3159,17 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
unbecome_user();
/* does this protocol need to be run as the connected user? */
- if ((flags & AS_USER) && !become_user(cnum,uid))
- return(ERROR(ERRSRV,ERRinvnid));
+ if ((flags & AS_USER) && !become_user(cnum,uid)) {
+ if (flags & AS_GUEST)
+ flags &= ~AS_USER;
+ else
+ return(ERROR(ERRSRV,ERRinvnid));
+ }
+ /* this code is to work around a bug is MS client 3 without
+ introducing a security hole - it needs to be able to do
+ print queue checks as guest if it isn't logged in properly */
+ if (flags & AS_USER)
+ flags &= ~AS_GUEST;
/* does it need write permission? */
if ((flags & NEED_WRITE) && !CAN_WRITE(cnum))
@@ -3744,7 +3753,7 @@ static void usage(char *pname)
if (!open_sockets(is_daemon,port))
exit(1);
-#ifdef FAST_SHARE_MODES
+#if FAST_SHARE_MODES
if (!start_share_mode_mgmt())
exit(1);
#endif
@@ -3763,7 +3772,7 @@ static void usage(char *pname)
process();
close_sockets();
-#ifdef FAST_SHARE_MODES
+#if FAST_SHARE_MODES
stop_share_mode_mgmt();
#endif