summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-13 00:20:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:33 -0500
commit89db7e100193c3b895180730f49061424a806c8e (patch)
tree750f01f8ee5b3bc309c21aea9782cf5986da0629 /source3/smbd/process.c
parenteffc7c0487da4212003e52aab71d1fb727a5aa77 (diff)
downloadsamba-89db7e100193c3b895180730f49061424a806c8e.tar.gz
samba-89db7e100193c3b895180730f49061424a806c8e.tar.bz2
samba-89db7e100193c3b895180730f49061424a806c8e.zip
r656: Make widelinks use realpath(). Tidy up cases where we need to become a service.
Jeremy. (This used to be commit a03b6a05e02ec8415efc0e8ceade102e06f8fffe)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 966bb63c1e..d0dfc6dd7d 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -344,6 +344,7 @@ force write permissions on print services.
#define CAN_IPC (1<<3)
#define AS_GUEST (1<<5)
#define QUEUE_IN_OPLOCK (1<<6)
+#define DO_CHDIR (1<<7)
/*
define a list of possible SMB messages and their corresponding
@@ -373,7 +374,7 @@ static const struct smb_message_struct {
/* 0x0e */ { "SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK },
/* 0x0f */ { "SMBmknew",reply_mknew,AS_USER},
/* 0x10 */ { "SMBchkpth",reply_chkpth,AS_USER},
-/* 0x11 */ { "SMBexit",reply_exit,0},
+/* 0x11 */ { "SMBexit",reply_exit,DO_CHDIR},
/* 0x12 */ { "SMBlseek",reply_lseek,AS_USER},
/* 0x13 */ { "SMBlockread",reply_lockread,AS_USER},
/* 0x14 */ { "SMBwriteunlock",reply_writeunlock,AS_USER},
@@ -469,7 +470,7 @@ static const struct smb_message_struct {
/* 0x6e */ { NULL, NULL, 0 },
/* 0x6f */ { NULL, NULL, 0 },
/* 0x70 */ { "SMBtcon",reply_tcon,0},
-/* 0x71 */ { "SMBtdis",reply_tdis,0},
+/* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR},
/* 0x72 */ { "SMBnegprot",reply_negprot,0},
/* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0},
/* 0x74 */ { "SMBulogoffX", reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */
@@ -754,7 +755,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
return(ERROR_DOS(ERRSRV,ERRaccess));
/* load service specific parameters */
- if (conn && !set_current_service(conn,(flags & AS_USER)?True:False))
+ if (conn && !set_current_service(conn,(flags & (AS_USER|DO_CHDIR)?True:False)))
return(ERROR_DOS(ERRSRV,ERRaccess));
/* does this protocol need to be run as guest? */