X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fgss%2Flgss_keyring.c;h=dfcb0ad955d339556497543107513cd0baf74a86;hp=6748f7c2a3b144ce3c92d07c965c33dd89f2aafc;hb=0ab950762cdec28636b6033c50a2e563c28ba954;hpb=151f5322d30ec52a1b99c852e5adbdbbe6fc7e08;ds=inline diff --git a/lustre/utils/gss/lgss_keyring.c b/lustre/utils/gss/lgss_keyring.c index 6748f7c..dfcb0ad 100644 --- a/lustre/utils/gss/lgss_keyring.c +++ b/lustre/utils/gss/lgss_keyring.c @@ -1067,13 +1067,15 @@ int main(int argc, char *argv[]) #ifdef HAVE_SETNS /* Is caller in different namespace? */ snprintf(path, sizeof(path), "/proc/%d/ns/mnt", getpid()); - if (stat(path, &parent_ns)) - logmsg(LL_ERR, "cannot stat %s: %s\n", path, strerror(errno)); - snprintf(path, sizeof(path), "/proc/%d/ns/mnt", uparam.kup_pid); - if (stat(path, &caller_ns)) - logmsg(LL_ERR, "cannot stat %s: %s\n", path, strerror(errno)); - if (caller_ns.st_ino != parent_ns.st_ino) { - other_ns = 1; + if (stat(path, &parent_ns)) { + logmsg(LL_DEBUG, "cannot stat %s: %s\n", path, strerror(errno)); + } else { + snprintf(path, sizeof(path), "/proc/%d/ns/mnt", uparam.kup_pid); + if (stat(path, &caller_ns)) + logmsg(LL_DEBUG, "cannot stat %s: %s\n", + path, strerror(errno)); + else if (caller_ns.st_ino != parent_ns.st_ino) + other_ns = 1; } #endif /* HAVE_SETNS */