]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/su.c: save_caller_context(): Remove unused parameter
authorAlejandro Colomar <alx@kernel.org>
Mon, 20 May 2024 15:51:27 +0000 (17:51 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 2 Jul 2024 02:40:11 +0000 (21:40 -0500)
Fixes: e6c2e4393784 ("Hardcoding Prog to known value")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/su.c

index 428d9149d4c3243a04d09d3e6865b68ae323d5ca..23d27f2e3485172f7c739e4d25c54c361081a82e 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -126,7 +126,7 @@ static void check_perms_pam (const struct passwd *pw);
 #else                          /* !USE_PAM */
 static void check_perms_nopam (const struct passwd *pw);
 #endif                         /* !USE_PAM */
-static void save_caller_context (char **argv);
+static void save_caller_context(void);
 static void process_flags (int argc, char **argv);
 static void set_environment (struct passwd *pw);
 
@@ -722,6 +722,7 @@ static /*@only@*/struct passwd * do_check_perms (void)
        return pw;
 }
 
+
 /*
  * save_caller_context - save information from the call context
  *
@@ -730,7 +731,8 @@ static /*@only@*/struct passwd * do_check_perms (void)
  *     the TTY (ttyp), and whether su was called from a console
  *     (is_console) for further processing and before they might change.
  */
-static void save_caller_context (char **argv)
+static void
+save_caller_context(void)
 {
        struct passwd *pw = NULL;
 #ifndef USE_PAM
@@ -801,6 +803,7 @@ static void save_caller_context (char **argv)
        pw_free (pw);
 }
 
+
 /*
  * process_flags - Process the command line arguments
  *
@@ -1013,7 +1016,7 @@ int main (int argc, char **argv)
        (void) bindtextdomain (PACKAGE, LOCALEDIR);
        (void) textdomain (PACKAGE);
 
-       save_caller_context (argv);
+       save_caller_context();
 
        OPENLOG (Prog);