svn commit: samba r7885 - in trunk/source/pam_smbpass: .

jra at samba.org jra at samba.org
Fri Jun 24 21:18:18 GMT 2005


Author: jra
Date: 2005-06-24 21:18:17 +0000 (Fri, 24 Jun 2005)
New Revision: 7885

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7885

Log:
Fix building with pam_smbpass.
Jeremy.

Modified:
   trunk/source/pam_smbpass/support.c


Changeset:
Modified: trunk/source/pam_smbpass/support.c
===================================================================
--- trunk/source/pam_smbpass/support.c	2005-06-24 21:14:46 UTC (rev 7884)
+++ trunk/source/pam_smbpass/support.c	2005-06-24 21:18:17 UTC (rev 7885)
@@ -232,23 +232,23 @@
  */
 char * smbpXstrDup( const char *x )
 {
-    register char *new = NULL;
+    register char *newstr = NULL;
 
     if (x != NULL) {
         register int i;
 
         for (i = 0; x[i]; ++i); /* length of string */
-        if ((new = SMB_MALLOC_ARRAY(char, ++i)) == NULL) {
+        if ((newstr = SMB_MALLOC_ARRAY(char, ++i)) == NULL) {
             i = 0;
             _log_err( LOG_CRIT, "out of memory in smbpXstrDup" );
         } else {
             while (i-- > 0) {
-                new[i] = x[i];
+                newstr[i] = x[i];
             }
         }
         x = NULL;
     }
-    return new;			/* return the duplicate or NULL on error */
+    return newstr;			/* return the duplicate or NULL on error */
 }
 
 /* ************************************************************** *
@@ -374,21 +374,21 @@
         pam_get_item( pamh, PAM_SERVICE, (const void **)&service );
 
         if (data_name != NULL) {
-            struct _pam_failed_auth *new = NULL;
+            struct _pam_failed_auth *newauth = NULL;
             const struct _pam_failed_auth *old = NULL;
 
             /* get a failure recorder */
 
-            new = SMB_MALLOC_P( struct _pam_failed_auth );
+            newauth = SMB_MALLOC_P( struct _pam_failed_auth );
 
-            if (new != NULL) {
+            if (newauth != NULL) {
 
                 /* any previous failures for this user ? */
                 pam_get_data(pamh, data_name, (const void **) &old);
 
                 if (old != NULL) {
-                    new->count = old->count + 1;
-                    if (new->count >= SMB_MAX_RETRIES) {
+                    newauth->count = old->count + 1;
+                    if (newauth->count >= SMB_MAX_RETRIES) {
                         retval = PAM_MAXTRIES;
                     }
                 } else {
@@ -396,17 +396,17 @@
                       "failed auth request by %s for service %s as %s",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
-                    new->count = 1;
+                    newauth->count = 1;
                 }
-		if (!NT_STATUS_IS_OK(sid_to_uid(pdb_get_user_sid(sampass), &(new->id)))) {
+		if (!NT_STATUS_IS_OK(sid_to_uid(pdb_get_user_sid(sampass), &(newauth->id)))) {
                     _log_err(LOG_NOTICE,
                       "failed auth request by %s for service %s as %s",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
 		}		
-                new->user = smbpXstrDup( name );
-                new->agent = smbpXstrDup( uidtoname( getuid() ) );
-                pam_set_data( pamh, data_name, new, _cleanup_failures );
+                newauth->user = smbpXstrDup( name );
+                newauth->agent = smbpXstrDup( uidtoname( getuid() ) );
+                pam_set_data( pamh, data_name, newauth, _cleanup_failures );
 
             } else {
                 _log_err( LOG_CRIT, "no memory for failure recorder" );



More information about the samba-cvs mailing list