summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-15 15:11:34 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-15 15:11:34 +0000
commit47673b32ed4a907b380b70d5f4f366ba8be301d2 (patch)
tree384a13167ec3b96d217acce3e6add82e391d1246 /source3/smbd/reply.c
parent7ea7a3361320c4c25e6bb80c1ed763c229fa541a (diff)
downloadsamba-47673b32ed4a907b380b70d5f4f366ba8be301d2.tar.gz
samba-47673b32ed4a907b380b70d5f4f366ba8be301d2.tar.bz2
samba-47673b32ed4a907b380b70d5f4f366ba8be301d2.zip
- added FAST_SHARE_MODES code
- added some named pipe code from Jim (This used to be commit c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index d463b305c9..a97c8c9c9c 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -294,6 +294,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
BOOL valid_nt_password = False;
pstring user;
BOOL guest=False;
+ BOOL computer_id=False;
*smb_apasswd = 0;
@@ -349,6 +350,15 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
DEBUG(3,("sesssetupX:name=[%s]\n",user));
+ /* If name ends in $ then I think it's asking about whether a */
+ /* computer with that name (minus the $) has access. For now */
+ /* say yes to everything ending in $. */
+ if (user[strlen(user) - 1] == '$') {
+ computer_id = True;
+ user[strlen(user) - 1] = '\0';
+ }
+
+
if (!*user)
strcpy(user,lp_guestaccount(-1));
@@ -380,7 +390,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
}
if (!valid_nt_password && !guest && !password_ok(user,smb_apasswd,smb_apasslen,NULL,False))
{
- if (lp_security() >= SEC_USER) {
+ if (!computer_id && lp_security() >= SEC_USER) {
#if (GUEST_SESSSETUP == 0)
return(ERROR(ERRSRV,ERRbadpw));
#endif
@@ -444,7 +454,7 @@ int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize)
CVAL(outbuf,smb_vwv0) = smb_com2;
SSVAL(outbuf,smb_vwv1,(chain_size+outsize)-4);
- if (guest)
+ if (guest && !computer_id)
SSVAL(outbuf,smb_vwv2,1);
/* register the name and uid as being validated, so further connections
@@ -980,6 +990,10 @@ int reply_open_and_X(char *inbuf,char *outbuf,int length,int bufsize)
struct stat sbuf;
int smb_action = 0;
+ /* If it's an IPC, pass off the pipe handler. */
+ if (IS_IPC(cnum))
+ return reply_open_pipe_and_X(inbuf,outbuf,length,bufsize);
+
/* XXXX we need to handle passed times, sattr and flags */
strcpy(fname,smb_buf(inbuf));