(do_auth): rename local: s/buf/password/
authorJim Meyering <meyering@redhat.com>
Tue, 4 Mar 2008 13:09:52 +0000 (14:09 +0100)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 4 Mar 2008 21:26:02 +0000 (16:26 -0500)
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/polkit-grant/polkit-grant-helper-shadow.c

index 9586c5f..d9d3ef1 100644 (file)
@@ -126,19 +126,19 @@ error:
 int do_auth (const char *user_to_auth)
 {
         struct spwd *shadow;
-        char buf[256];
+        char password[256];
 
         if ((shadow = getspnam (user_to_auth)) == NULL)
                 goto error;
 
-        if (fgets (buf, sizeof (buf), stdin) == NULL)
+        if (fgets (password, sizeof (password), stdin) == NULL)
                 goto error;
 
-        if (strlen (buf) > 0 &&
-                buf[strlen (buf) - 1] == '\n')
-                        buf[strlen (buf) - 1] = '\0';
+        if (strlen (password) > 0 &&
+                password[strlen (password) - 1] == '\n')
+                        password[strlen (password) - 1] = '\0';
 
-        if (strcmp (shadow->sp_pwdp, crypt (buf, shadow->sp_pwdp)) != 0)
+        if (strcmp (shadow->sp_pwdp, crypt (password, shadow->sp_pwdp)) != 0)
                 goto error;
 
         return 1;