1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

added a -h usage option to winbindd

(This used to be commit d6a4a10f58accd6ad158ba60eb1508f00c9a4dd3)
This commit is contained in:
Andrew Tridgell 2002-03-15 09:20:36 +00:00
parent 56e3c83af1
commit 04b22713d0

View File

@ -647,6 +647,17 @@ static void process_loop(int accept_sock)
struct winbindd_state server_state; /* Server state information */ struct winbindd_state server_state; /* Server state information */
static void usage(void)
{
printf("Usage: winbindd [options]\n");
printf("\t-i interactive mode\n");
printf("\t-n disable cacheing\n");
printf("\t-d level set debug level\n");
printf("\t-s configfile choose smb.conf location\n");
printf("\t-h show this help message\n");
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
extern BOOL AllowDebugChange; extern BOOL AllowDebugChange;
@ -684,7 +695,7 @@ int main(int argc, char **argv)
/* Initialise samba/rpc client stuff */ /* Initialise samba/rpc client stuff */
while ((opt = getopt(argc, argv, "id:s:n")) != EOF) { while ((opt = getopt(argc, argv, "id:s:nh")) != EOF) {
switch (opt) { switch (opt) {
/* Don't become a daemon */ /* Don't become a daemon */
@ -708,6 +719,10 @@ int main(int argc, char **argv)
pstrcpy(dyn_CONFIGFILE,optarg); pstrcpy(dyn_CONFIGFILE,optarg);
break; break;
case 'h':
usage();
exit(0);
default: default:
printf("Unknown option %c\n", (char)opt); printf("Unknown option %c\n", (char)opt);
exit(1); exit(1);