summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-19 04:01:16 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-19 04:01:16 +0000
commit612682354fa978d7b883028b3aace52a2882adca (patch)
tree9c0067c0162178774ce251422370991663fd85aa /source3/smbd
parentd2db520692898c317acc2eba78f88f8398a1fd21 (diff)
downloadsamba-612682354fa978d7b883028b3aace52a2882adca.tar.gz
samba-612682354fa978d7b883028b3aace52a2882adca.tar.bz2
samba-612682354fa978d7b883028b3aace52a2882adca.zip
- got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot (This used to be commit 2c2d95d77d3667eaa9252506a82b9054b0d0e01c)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/ipc.c14
-rw-r--r--source3/smbd/server.c10
-rw-r--r--source3/smbd/service.c10
3 files changed, 13 insertions, 21 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 17aa83b72b..64ec05b017 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -80,7 +80,7 @@ static int CopyExpanded(connection_struct *conn,
StrnCpy(buf,src,sizeof(buf)/2);
pstring_sub(buf,"%S",lp_servicename(snum));
- standard_sub(conn,buf);
+ standard_sub_conn(conn,buf);
StrnCpy(*dst,buf,*n);
l = strlen(*dst) + 1;
(*dst) += l;
@@ -105,7 +105,7 @@ static int StrlenExpanded(connection_struct *conn, int snum, char* s)
if (!s) return(0);
StrnCpy(buf,s,sizeof(buf)/2);
pstring_sub(buf,"%S",lp_servicename(snum));
- standard_sub(conn,buf);
+ standard_sub_conn(conn,buf);
return strlen(buf) + 1;
}
@@ -115,7 +115,7 @@ static char* Expand(connection_struct *conn, int snum, char* s)
if (!s) return(NULL);
StrnCpy(buf,s,sizeof(buf)/2);
pstring_sub(buf,"%S",lp_servicename(snum));
- standard_sub(conn,buf);
+ standard_sub_conn(conn,buf);
return &buf[0];
}
@@ -2137,7 +2137,7 @@ static BOOL api_RNetServerGetInfo(connection_struct *conn,uint16 vuid, char *par
SIVAL(p,6,0);
} else {
SIVAL(p,6,PTR_DIFF(p2,*rdata));
- standard_sub(conn,comment);
+ standard_sub_conn(conn,comment);
StrnCpy(p2,comment,MAX(mdrcnt - struct_len,0));
p2 = skip_string(p2,1);
}
@@ -2519,7 +2519,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
SSVAL(p,52,0); /* flags */
SIVAL(p,54,PTR_DIFF(p2,*rdata)); /* script_path */
pstrcpy(p2,lp_logon_script());
- standard_sub( conn, p2 );
+ standard_sub_conn( conn, p2 );
p2 = skip_string(p2,1);
if (uLevel == 2)
{
@@ -2544,7 +2544,7 @@ static BOOL api_RNetUserGetInfo(connection_struct *conn,uint16 vuid, char *param
SSVALS(p,104,-1); /* num_logons */
SIVAL(p,106,PTR_DIFF(p2,*rdata)); /* logon_server */
pstrcpy(p2,"\\\\%L");
- standard_sub_basic(p2);
+ standard_sub_conn(conn, p2);
p2 = skip_string(p2,1);
SSVAL(p,110,49); /* country_code */
SSVAL(p,112,860); /* code page */
@@ -2667,7 +2667,7 @@ static BOOL api_WWkstaUserLogon(connection_struct *conn,uint16 vuid, char *param
{
pstring logon_script;
pstrcpy(logon_script,lp_logon_script());
- standard_sub( conn, logon_script );
+ standard_sub_conn( conn, logon_script );
PACKS(&desc,"z", logon_script); /* script path */
}
/* End of JHT mods */
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index cbcdad157a..a7baa9e327 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -512,7 +512,6 @@ static void usage(char *pname)
printf("\t-D Become a daemon\n");
printf("\t-a Append to log file (default)\n");
printf("\t-o Overwrite log file, don't append\n");
- printf("\t-P Passive only\n");
printf("\t-h Print usage\n");
printf("\t-? Print usage\n");
printf("\t-V Print version\n");
@@ -548,19 +547,12 @@ static void usage(char *pname)
argc--;
}
- while ( EOF != (opt = getopt(argc, argv, "O:l:s:d:Dp:h?VPaof:")) )
+ while ( EOF != (opt = getopt(argc, argv, "O:l:s:d:Dp:h?Vaof:")) )
switch (opt) {
case 'O':
pstrcpy(user_socket_options,optarg);
break;
- case 'P':
- {
- extern BOOL passive;
- passive = True;
- }
- break;
-
case 's':
pstrcpy(servicesf,optarg);
break;
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 24ba79906b..b7942906df 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -488,7 +488,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
{
pstring s;
pstrcpy(s,lp_pathname(snum));
- standard_sub(conn,s);
+ standard_sub_conn(conn,s);
string_set(&conn->connectpath,s);
DEBUG(3,("Connect path is %s\n",s));
}
@@ -523,7 +523,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (*lp_rootpreexec(SNUM(conn))) {
pstring cmd;
pstrcpy(cmd,lp_rootpreexec(SNUM(conn)));
- standard_sub(conn,cmd);
+ standard_sub_conn(conn,cmd);
DEBUG(5,("cmd=%s\n",cmd));
ret = smbrun(cmd,NULL,False);
if (ret != 0 && lp_rootpreexec_close(SNUM(conn))) {
@@ -584,7 +584,7 @@ connection_struct *make_connection(char *service,char *user,char *password, int
if (*lp_preexec(SNUM(conn))) {
pstring cmd;
pstrcpy(cmd,lp_preexec(SNUM(conn)));
- standard_sub(conn,cmd);
+ standard_sub_conn(conn,cmd);
ret = smbrun(cmd,NULL,False);
if (ret != 0 && lp_preexec_close(SNUM(conn))) {
DEBUG(1,("preexec gave %d - failing connection\n", ret));
@@ -680,7 +680,7 @@ void close_cnum(connection_struct *conn, uint16 vuid)
become_user(conn, vuid)) {
pstring cmd;
pstrcpy(cmd,lp_postexec(SNUM(conn)));
- standard_sub(conn,cmd);
+ standard_sub_conn(conn,cmd);
smbrun(cmd,NULL,False);
unbecome_user();
}
@@ -690,7 +690,7 @@ void close_cnum(connection_struct *conn, uint16 vuid)
if (*lp_rootpostexec(SNUM(conn))) {
pstring cmd;
pstrcpy(cmd,lp_rootpostexec(SNUM(conn)));
- standard_sub(conn,cmd);
+ standard_sub_conn(conn,cmd);
smbrun(cmd,NULL,False);
}