From f1c3f7a54f836ab4e70d85e3ede9fd61cf4e3c5f Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Sat, 23 Sep 2023 02:02:30 -0500 Subject: [PATCH] LU-17139 utils: l_getidentity remove 'files' => 'lustre' alias Fully remove the old 'files' alias for 'lustre' and deprecate 'nss_files' alias for 'files' now that it can be used directly. Signed-off-by: Shaun Tancheff Change-Id: Ied7cf87e9be8d474f9b65a9b5b14870578806151 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52487 Reviewed-by: corey tesdahl Reviewed-by: Petros Koutoupis Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/doc/l_getidentity.8 | 14 ++------------ lustre/utils/l_getidentity.c | 19 +++++-------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/lustre/doc/l_getidentity.8 b/lustre/doc/l_getidentity.8 index 7633e31..d86f1c9 100644 --- a/lustre/doc/l_getidentity.8 +++ b/lustre/doc/l_getidentity.8 @@ -69,22 +69,12 @@ and .br For historical reasons -.B files -was originally used instead in place of -.B lustre -to enable auth by lustre files. At the time of writing -.B files -is still widely used where -.B lustre -is intended. -This alias is now officially deprecated and using it will generate periodic -warnings. The alias will be removed in a future release. -As an alternative .B nss_files -can be specified for the +was needed to use the .BR nss (5) .B files module. +This alias is now deprecated and will be removed in a future release. .SH OPTIONS .TP .B -d diff --git a/lustre/utils/l_getidentity.c b/lustre/utils/l_getidentity.c index b077b14..7bed262 100644 --- a/lustre/utils/l_getidentity.c +++ b/lustre/utils/l_getidentity.c @@ -756,7 +756,7 @@ static void do_warn_interval(struct timeval *now) const char *perm_warning = PERM_PATHNAME "-warning"; struct stat sbuf; const char msg[] = - "Use 'lookup lustre'. The 'files' alias is deprecated.\n"; + "Use 'lookup files'. The 'nss_files' alias is deprecated.\n"; if (stat(perm_warning, &sbuf)) { if (errno == ENOENT) @@ -797,14 +797,6 @@ out_close: } } -/** initialize module to access local /etc/lustre/passwd,group files */ -static int init_lustre_files_module(struct nss_module *mod, - struct timeval *start) -{ - do_warn_interval(start); - return init_lustre_module(mod); -} - /** * Check and parse lookup db config line. * File should start with 'lookup' followed by the modules @@ -845,13 +837,12 @@ static int lookup_db_line_nss(char *line, struct timeval *start) else return -ERANGE; - if (!strcmp(tok, "files")) - ret = init_lustre_files_module(newmod, start); - else if (!strcmp(tok, "lustre")) + if (!strcmp(tok, "lustre")) ret = init_lustre_module(newmod); - else if (!strcmp(tok, "nss_files")) + else if (!strcmp(tok, "nss_files")) { + do_warn_interval(start); ret = init_nss_lib_module(newmod, "files"); - else + } else ret = init_nss_lib_module(newmod, tok); if (ret) -- 1.8.3.1