"\t\tskip_lfsck: NOT auto resume the paused/crashed LFSCK\n"
"\t\texclude=<ostname>[:<ostname>] : colon-separated list of "
"inactive OSTs (e.g. lustre-OST0001)\n"
+#ifdef HAVE_GSS
+ "\t\tskpath=<file|directory>: Path to a file or directory of"
+ "key configuration files to load into the kernel keyring\n"
+#endif
"\t\tretry=<num>: number of times mount is retried by client\n"
"\t\tmd_stripe_cache_size=<num>: set the raid stripe cache "
"size for the underlying raid if present\n");
/* XXX special check for 'force' option */
++mop->mo_force;
printf("force: %d\n", mop->mo_force);
+#ifdef HAVE_GSS
+ } else if (val && strncmp(opt, "skpath=", 7) == 0) {
+ if (strlen(val) + 1 >= sizeof(mop->mo_skpath)) {
+ fprintf(stderr,
+ "%s: shared key path too long\n",
+ progname);
+ free(options);
+ return -1;
+ }
+ strncpy(mop->mo_skpath, val + 1, strlen(val + 1));
+#endif
} else if (parse_one_option(opt, flagp) == 0) {
/* pass this on as an option */
append_option(options, opt);
struct mount_opts mop;
char *options;
int i, rc, flags;
+ bool client;
progname = strrchr(argv[0], '/');
progname = progname ? progname + 1 : argv[0];
return rc;
}
- if (strstr(mop.mo_usource, ":/") == NULL) {
+ client = (strstr(mop.mo_usource, ":/") != NULL);
+ if (!client) {
rc = osd_init();
if (rc)
return rc;
printf("mounting device %s at %s, flags=%#x options=%s\n",
mop.mo_source, mop.mo_target, flags, options);
- if (strstr(mop.mo_usource, ":/") == NULL &&
- osd_tune_lustre(mop.mo_source, &mop)) {
+ if (!client && osd_tune_lustre(mop.mo_source, &mop)) {
if (verbose)
fprintf(stderr, "%s: unable to set tunables for %s"
" (may cause reduced IO performance)\n",
argv[0], mop.mo_source);
}
+#ifdef HAVE_GSS
+ if (mop.mo_skpath[0] != '\0') {
+ /* Treat shared key failures as fatal */
+ rc = load_shared_keys(&mop);
+ if (rc) {
+ fprintf(stderr,
+ "%s: Error loading shared keys: %s\n",
+ progname, strerror(rc));
+ return rc;
+ }
+ }
+#endif
+
if (!mop.mo_fake) {
/* flags and target get to lustre_get_sb(), but not
* lustre_fill_super(). Lustre ignores the flags, but mount
/* mo_usource should be freed, but we can rely on the kernel */
free(mop.mo_source);
- if (strstr(mop.mo_usource, ":/") == NULL)
+ if (!client)
osd_fini();
return rc;