From 1fd15f04b3028276d77155c055e8382127a4b5b0 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 20 Dec 2014 12:37:58 +0000 Subject: newgrp: set function arguments read-only when possible Signed-off-by: Sami Kerola --- login-utils/newgrp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'login-utils/newgrp.c') diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c index 0fae08766..b1134e941 100644 --- a/login-utils/newgrp.c +++ b/login-utils/newgrp.c @@ -74,7 +74,7 @@ static int memset_s(void *v, size_t sz, const int c) } /* try to read password from gshadow */ -static char *get_gshadow_pwd(char *groupname) +static char *get_gshadow_pwd(const char *groupname) { #ifdef HAVE_GETSGNAM struct sgrp *sgrp; @@ -117,7 +117,7 @@ static char *get_gshadow_pwd(char *groupname) #endif /* HAVE_GETSGNAM */ } -static int allow_setgid(struct passwd *pe, struct group *ge) +static int allow_setgid(const struct passwd *pe, const struct group *ge) { char **look; int notfound = 1; @@ -160,7 +160,7 @@ static int allow_setgid(struct passwd *pe, struct group *ge) return FALSE; } -static void __attribute__ ((__noreturn__)) usage(FILE * out) +static void __attribute__((__noreturn__)) usage(FILE *out) { fprintf(out, USAGE_HEADER); fprintf(out, _(" %s \n"), program_invocation_short_name); -- cgit v1.2.3-55-g7522