summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-05-05 11:34:03 +0000
committerAndrew Tridgell <tridge@samba.org>1996-05-05 11:34:03 +0000
commitefdeaf4cf626348fd90dffebaec6169af5634e53 (patch)
tree37ca2d19307b73610da2fb4f2ae282e40499e566
parent90d21da1b957a865bb2505bcde804a3cc8713bd8 (diff)
downloadsamba-efdeaf4cf626348fd90dffebaec6169af5634e53.tar.gz
samba-efdeaf4cf626348fd90dffebaec6169af5634e53.tar.bz2
samba-efdeaf4cf626348fd90dffebaec6169af5634e53.zip
- added hostname support to smbstatus
- fix a bug where -s would not be recognised (This used to be commit 03744dc0cd49a54b4dd30645a2b77007c9d19bdc)
-rw-r--r--source3/utils/status.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index ed0ae53211..1ae38528d0 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -33,6 +33,7 @@
struct connect_record crec;
extern int DEBUGLEVEL;
extern FILE *dbf;
+extern pstring myhostname;
static pstring Ucrit_username = ""; /* added by OH */
int Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */
@@ -69,7 +70,7 @@ int main(int argc, char *argv[])
return(1);
}
- while ((c = getopt(argc, argv, "pdsu:")) != EOF) {
+ while ((c = getopt(argc, argv, "pds:u:")) != EOF) {
switch (c) {
case 'd':
verbose = 1;
@@ -89,13 +90,13 @@ int main(int argc, char *argv[])
}
}
-
-
if (!lp_load(servicesf,False)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
return (-1);
}
+ get_myname(myhostname, NULL);
+
if (verbose) {
printf("using configfile = %s\n", servicesf);
printf("lockdir = %s\n", *lp_lockdir() ? lp_lockdir() : "NULL");
@@ -113,6 +114,9 @@ int main(int argc, char *argv[])
printf("You need to have status=yes in your smb config file\n");
return(0);
}
+ else if (verbose) {
+ printf("Opened status file %s\n", fname);
+ }
uid = getuid();