summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-14 15:52:14 +0000
committerGerald Carter <jerry@samba.org>2003-01-14 15:52:14 +0000
commit5d821c0e23f96f4da6a29a6bebf800532fcf1aa6 (patch)
tree3e97a1a930d4d107f48a6089665830717b9e2f5e /source/smbd
parent1df808ac8931979000d681bd086399ef306873b6 (diff)
downloadsamba-5d821c0e23f96f4da6a29a6bebf800532fcf1aa6.tar.gz
samba-5d821c0e23f96f4da6a29a6bebf800532fcf1aa6.tar.xz
samba-5d821c0e23f96f4da6a29a6bebf800532fcf1aa6.zip
make -i flag work lik eit did in 2.2
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 0b2fa2a1bab..1d1061f6d83 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -145,7 +145,7 @@ static void msg_exit_server(int msg_type, pid_t src, void *buf, size_t len)
Open the socket communication.
****************************************************************************/
-static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
+static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_ports)
{
int num_interfaces = iface_count();
int num_sockets = 0;
@@ -343,6 +343,9 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
strerror(errno)));
continue;
}
+
+ if (smbd_server_fd() != -1 && interactive)
+ return True;
if (smbd_server_fd() != -1 && sys_fork()==0) {
/* Child code ... */
@@ -805,7 +808,7 @@ static BOOL init_structs(void )
start_background_queue();
*/
- if (!open_sockets_smbd(is_daemon,ports))
+ if (!open_sockets_smbd(is_daemon, interactive, ports))
exit(1);
/*