]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
newgrp: rename memset_s()
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 24 Feb 2016 01:07:57 +0000 (02:07 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 29 Feb 2016 12:04:59 +0000 (13:04 +0100)
It's already defined in OSX standard c library.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
login-utils/newgrp.c

index 141b41bf401567a824ce4540a643490c9bb702ea..56639d1f0bc679a6ec3782b9d91d1a8b3efc92c1 100644 (file)
@@ -62,7 +62,7 @@ static char *xgetpass(FILE *input, const char *prompt)
 
 /* Ensure memory is set to value c without compiler optimization getting
  * into way that could happen with memset(3). */
-static int memset_s(void *v, size_t sz, const int c)
+static int xmemset_s(void *v, size_t sz, const int c)
 {
        volatile unsigned char *p = v;
 
@@ -148,7 +148,7 @@ static int allow_setgid(const struct passwd *pe, const struct group *ge)
        if (pwd && *pwd && (xpwd = xgetpass(stdin, _("Password: ")))) {
                char *cbuf = crypt(xpwd, pwd);
 
-               memset_s(xpwd, strlen(xpwd), 0);
+               xmemset_s(xpwd, strlen(xpwd), 0);
                free(xpwd);
                if (!cbuf)
                        warn(_("crypt failed"));