summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-04-22 03:16:04 +0000
committerAndrew Tridgell <tridge@samba.org>2001-04-22 03:16:04 +0000
commitd3e438d54ff05a3678f712bacf5c702ebf7b2a06 (patch)
tree8f9336573bfc8063b666602afabb69c275c3a940 /source3
parentac9e221c3e6bc892e0f73a403c89434ae13a8eec (diff)
downloadsamba-d3e438d54ff05a3678f712bacf5c702ebf7b2a06.tar.gz
samba-d3e438d54ff05a3678f712bacf5c702ebf7b2a06.tar.bz2
samba-d3e438d54ff05a3678f712bacf5c702ebf7b2a06.zip
a couple of minor merges from 2_2
(This used to be commit 67aa587eb2ee9044574ee212dfd7d52895f868c0)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c3
-rw-r--r--source3/client/smbmount.c6
-rw-r--r--source3/client/smbspool.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 1d48ac0f71..9c167e20c2 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2201,6 +2201,7 @@ static int do_message_op(void)
extern FILE *dbf;
extern char *optarg;
extern int optind;
+ int old_debug;
pstring query_host;
BOOL message = False;
extern char tar_type;
@@ -2253,9 +2254,11 @@ static int do_message_op(void)
in_client = True; /* Make sure that we tell lp_load we are */
+ old_debug = DEBUGLEVEL;
if (!lp_load(servicesf,True,False,False)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
}
+ DEBUGLEVEL = old_debug;
codepage_initialise(lp_client_code_page());
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 7da96ba8c3..a121d1fa22 100644
--- a/source3/client/smbmount.c
+++ b/source3/client/smbmount.c
@@ -95,10 +95,12 @@ static void daemonize(void)
static void close_our_files(int client_fd)
{
int i;
+ struct rlimit limits;
getrlimit(RLIMIT_NOFILE,&limits);
- for (1 = 0; i< limits.rlim_max, i++) {
- if (i == client_fd) continue;
+ for (i = 0; i< limits.rlim_max; i++) {
+ if (i == client_fd)
+ continue;
close(i);
}
}
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index 581b6508b8..b0077b73ba 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -59,7 +59,7 @@ static int smb_print(struct cli_state *, char *, FILE *);
*server, /* Server name */
*printer; /* Printer name */
FILE *fp; /* File to print */
- int status; /* Status of LPD job */
+ int status=0; /* Status of LPD job */
struct cli_state *cli; /* SMB interface */
/* we expect the URI in argv[0]. Detect the case where it is in argv[1] and cope */