From b26623bc3a8ff5191763c83564453e77edee836a Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sun, 2 Nov 1997 20:35:20 +0000 Subject: Christian Lademann's contribution: new capabilities in smb.conf. '<' and '|' characters indicate read file and execute command respectively, and feed the output into the parameter (!!!). '<$' and '|$' means run standard_sub_basic() on them. this is going to be fun to document in smb.conf.5.... also, Christian created a new "online" service parameter. services can be taken "off-line".... (This used to be commit 15f44d28916cdc1432bffdbb999c7cf7efd8fb86) --- source3/smbd/server.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'source3/smbd/server.c') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 095bc00e08..25d24eab53 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -4356,6 +4356,7 @@ force write permissions on print services. #define TIME_INIT (1<<2) #define CAN_IPC (1<<3) #define AS_GUEST (1<<5) +#define DONT_CHECK_ONLINE (1<<6) /* @@ -4377,15 +4378,15 @@ struct smb_message_struct /* CORE PROTOCOL */ - {SMBnegprot,"SMBnegprot",reply_negprot,0}, - {SMBtcon,"SMBtcon",reply_tcon,0}, - {SMBtdis,"SMBtdis",reply_tdis,0}, - {SMBexit,"SMBexit",reply_exit,0}, - {SMBioctl,"SMBioctl",reply_ioctl,0}, - {SMBecho,"SMBecho",reply_echo,0}, - {SMBsesssetupX,"SMBsesssetupX",reply_sesssetup_and_X,0}, - {SMBtconX,"SMBtconX",reply_tcon_and_X,0}, - {SMBulogoffX, "SMBulogoffX", reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */ + {SMBnegprot,"SMBnegprot",reply_negprot,DONT_CHECK_ONLINE}, + {SMBtcon,"SMBtcon",reply_tcon,DONT_CHECK_ONLINE}, + {SMBtdis,"SMBtdis",reply_tdis,DONT_CHECK_ONLINE}, + {SMBexit,"SMBexit",reply_exit,DONT_CHECK_ONLINE}, + {SMBioctl,"SMBioctl",reply_ioctl,DONT_CHECK_ONLINE}, + {SMBecho,"SMBecho",reply_echo,DONT_CHECK_ONLINE}, + {SMBsesssetupX,"SMBsesssetupX",reply_sesssetup_and_X,DONT_CHECK_ONLINE}, + {SMBtconX,"SMBtconX",reply_tcon_and_X,DONT_CHECK_ONLINE}, + {SMBulogoffX, "SMBulogoffX", reply_ulogoffX, DONT_CHECK_ONLINE}, /* ulogoff doesn't give a valid TID */ {SMBgetatr,"SMBgetatr",reply_getatr,AS_USER}, {SMBsetatr,"SMBsetatr",reply_setatr,AS_USER | NEED_WRITE}, {SMBchkpth,"SMBchkpth",reply_chkpth,AS_USER}, @@ -4575,6 +4576,10 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize if ((flags & AS_GUEST) && (!become_guest() || !check_access(-1))) return(ERROR(ERRSRV,ERRaccess)); + /* is this service online? */ + if (! (flags & DONT_CHECK_ONLINE) && ! lp_online(SNUM(cnum))) + return(ERROR(ERRHRD,ERRnotready)); + last_inbuf = inbuf; outsize = smb_messages[match].fn(inbuf,outbuf,size,bufsize); -- cgit