summaryrefslogtreecommitdiffstats
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
commit03744dc0cd49a54b4dd30645a2b77007c9d19bdc (patch)
tree213c68410d72a58007a10bf75b2a675396589ec5
parentf81295c7b4346759ac522ba610438a68204f1858 (diff)
downloadsamba-03744dc0cd49a54b4dd30645a2b77007c9d19bdc.tar.gz
samba-03744dc0cd49a54b4dd30645a2b77007c9d19bdc.tar.xz
samba-03744dc0cd49a54b4dd30645a2b77007c9d19bdc.zip
- added hostname support to smbstatus
- fix a bug where -s would not be recognised
-rw-r--r--source/utils/status.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/utils/status.c b/source/utils/status.c
index ed0ae532114..1ae38528d03 100644
--- a/source/utils/status.c
+++ b/source/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();