diff --git a/lib/run_part.c b/lib/run_part.c index 1ce06be0..884bbefa 100644 --- a/lib/run_part.c +++ b/lib/run_part.c @@ -8,9 +8,10 @@ #include #include #include +#include "run_part.h" #include "shadowlog_internal.h" -int run_part (char *script_path, char *name, char *action) +int run_part (char *script_path, const char *name, const char *action) { int pid; int wait_status; @@ -39,7 +40,7 @@ int run_part (char *script_path, char *name, char *action) return (1); } -int run_parts (char *directory, char *name, char *action) +int run_parts (const char *directory, const char *name, const char *action) { struct dirent **namelist; int scanlist; diff --git a/lib/run_part.h b/lib/run_part.h index d3d80663..0b68dbfc 100644 --- a/lib/run_part.h +++ b/lib/run_part.h @@ -1,2 +1,2 @@ -int run_part (char *script_path, char *name, char *action); -int run_parts (char *directory, char *name, char *action); +int run_part (char *script_path, const char *name, const char *action); +int run_parts (const char *directory, const char *name, const char *action); diff --git a/src/useradd.c b/src/useradd.c index 456b9de5..34376fa5 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2492,7 +2492,7 @@ int main (int argc, char **argv) (!user_id || (user_id <= uid_max && user_id >= uid_min)); #endif /* ENABLE_SUBIDS */ - if (run_parts ("/etc/shadow-maint/useradd-pre.d", (char*)user_name, + if (run_parts ("/etc/shadow-maint/useradd-pre.d", user_name, "useradd")) { exit(1); } @@ -2715,7 +2715,7 @@ int main (int argc, char **argv) create_mail (); } - if (run_parts ("/etc/shadow-maint/useradd-post.d", (char*)user_name, + if (run_parts ("/etc/shadow-maint/useradd-post.d", user_name, "useradd")) { exit(1); }