X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fgss%2Fsvcgssd.c;h=cebd8521ac48bae87ff0c660ab4bd8fd0fe45b44;hb=9f7e47cfc7f0346ac2eb0ab45c8dff058c271fa1;hp=f3b968163eadb682ec8fff2ceba4377f2d43933f;hpb=d2d56f38da01001c92a09afc6b52b5acbd9bc13c;p=fs%2Flustre-release.git diff --git a/lustre/utils/gss/svcgssd.c b/lustre/utils/gss/svcgssd.c index f3b9681..cebd852 100644 --- a/lustre/utils/gss/svcgssd.c +++ b/lustre/utils/gss/svcgssd.c @@ -80,6 +80,7 @@ closeall(int min) (void) close(fd); } } + /* * mydaemon creates a pipe between the partent and child * process. The parent process will wait until the @@ -176,7 +177,7 @@ sig_hup(int signal) static void usage(char *progname) { - fprintf(stderr, "usage: %s [-n] [-f] [-v] [-r]\n", + fprintf(stderr, "usage: %s [-n] [-f] [-v] [-r] [-m] [-o] [-g]\n", progname); exit(1); } @@ -188,11 +189,11 @@ main(int argc, char *argv[]) int fg = 0; int verbosity = 0; int opt; - int must_srv_mds = 0, must_srv_oss = 0; + int must_srv_mds = 0, must_srv_oss = 0, must_srv_mgs = 0; extern char *optarg; char *progname; - while ((opt = getopt(argc, argv, "fvrnp:")) != -1) { + while ((opt = getopt(argc, argv, "fvrnmog:")) != -1) { switch (opt) { case 'f': fg = 1; @@ -211,6 +212,10 @@ main(int argc, char *argv[]) get_creds = 1; must_srv_oss = 1; break; + case 'g': + get_creds = 1; + must_srv_mgs = 1; + break; default: usage(argv[0]); break; @@ -233,11 +238,12 @@ main(int argc, char *argv[]) printerr(0, "ERROR: Can't get Local Kerberos realm\n"); exit(1); } - - if (get_creds && gssd_prepare_creds(must_srv_mds, must_srv_oss)) { + + if (get_creds && + gssd_prepare_creds(must_srv_mgs, must_srv_mds, must_srv_oss)) { printerr(0, "unable to obtain root (machine) credentials\n"); printerr(0, "do you have a keytab entry for " - "nfs/@ in " + "/@ in " "/etc/krb5.keytab?\n"); exit(1); }