Whamcloud - gitweb
LU-17139 utils: l_getidentity remove 'files' => 'lustre' alias 87/52487/8
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sat, 23 Sep 2023 07:02:30 +0000 (02:02 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 2 Dec 2024 05:41:47 +0000 (05:41 +0000)
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 <shaun.tancheff@hpe.com>
Change-Id: Ied7cf87e9be8d474f9b65a9b5b14870578806151
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52487
Reviewed-by: corey tesdahl <corey.tesdahl@hpe.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/l_getidentity.8
lustre/utils/l_getidentity.c

index 7633e31..d86f1c9 100644 (file)
@@ -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
index b077b14..7bed262 100644 (file)
@@ -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)