]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 461089
authorAndrew G. Morgan <morgan@kernel.org>
Thu, 13 Sep 2001 02:31:39 +0000 (02:31 +0000)
committerAndrew G. Morgan <morgan@kernel.org>
Thu, 13 Sep 2001 02:31:39 +0000 (02:31 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
remove a compilation warning.

CHANGELOG
modules/pam_unix/pam_unix_passwd.c

index 091a7387be4735aea7a019615bddbf33933586ed..d243742fd9cea09de34e97b40279cf07451489b1 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -49,6 +49,7 @@ bug report - outstanding bugs are listed here:
 0.76: please submit patches for this section with actual code/doc
       patches!
 
+* pam_unix_passwd: got rid of an annoying warning (Bug 461089 - agmorgan)
 * pam_unix: removed superfluous use of static variables in md5 and bigcrypt
   routines, bringing us a step closer to thread-safeness.  Eliminated
   some variable indirection along the way.  (Bug 440107 - vorlon)
index 85c0a44d0d6be510bb812b2ea2c38196c1df9a88..7f8f6e030cc7257ae9bfd22dee7385a2e4fa9886 100644 (file)
@@ -350,7 +350,14 @@ static int _update_passwd(const char *forwho, const char *towhat)
        tmpent = fgetpwent(opwfile);
        while (tmpent) {
                if (!strcmp(tmpent->pw_name, forwho)) {
-                       tmpent->pw_passwd = towhat;
+                       /* To shut gcc up */
+                       union {
+                               const char *const_charp;
+                               char *charp;
+                       } assigned_passwd;
+                       assigned_passwd.const_charp = towhat;
+                       
+                       tmpent->pw_passwd = assigned_passwd.charp;
                }
                if (putpwent(tmpent, pwfile)) {
                        fprintf(stderr, "error writing entry to password file: %s\n",