Blob Blame History Raw
diff -up nss-pam-ldapd-0.8.13/nslcd/group.c.uid_formatting nss-pam-ldapd-0.8.13/nslcd/group.c
--- nss-pam-ldapd-0.8.13/nslcd/group.c.uid_formatting	2013-02-23 22:24:00.000000000 +0100
+++ nss-pam-ldapd-0.8.13/nslcd/group.c	2017-10-24 14:17:27.489696761 +0200
@@ -109,10 +109,8 @@ static int mkfilter_group_bygid(gid_t gi
   }
   else
   {
-    return mysnprintf(buffer,buflen,
-                      "(&%s(%s=%d))",
-                      group_filter,
-                      attmap_group_gidNumber,(int)gid);
+    return mysnprintf(buffer,buflen,"(&%s(%s=%lu))",
+                      group_filter,attmap_group_gidNumber,(unsigned long int)gid);
   }
 }
 
diff -up nss-pam-ldapd-0.8.13/nslcd/nslcd.c.uid_formatting nss-pam-ldapd-0.8.13/nslcd/nslcd.c
--- nss-pam-ldapd-0.8.13/nslcd/nslcd.c.uid_formatting	2017-10-24 14:17:05.117590857 +0200
+++ nss-pam-ldapd-0.8.13/nslcd/nslcd.c	2017-10-24 14:17:27.490696766 +0200
@@ -402,8 +402,8 @@ static void handleconnection(int sock,MY
   if (getpeercred(sock,&uid,&gid,&pid))
     log_log(LOG_DEBUG,"connection from unknown client: %s",strerror(errno));
   else
-    log_log(LOG_DEBUG,"connection from pid=%d uid=%d gid=%d",
-                      (int)pid,(int)uid,(int)gid);
+    log_log(LOG_DEBUG,"connection from pid=%lu uid=%lu gid=%lu",
+            (unsigned long int)pid,(unsigned long int)uid,(unsigned long int)gid);
   /* create a stream object */
   if ((fp=tio_fdopen(sock,READ_TIMEOUT,WRITE_TIMEOUT,
                      READBUFFER_MINSIZE,READBUFFER_MAXSIZE,
@@ -519,7 +519,7 @@ static void create_pidfile(const char *f
       log_log(LOG_ERR,"cannot truncate pid file (%s): %s",filename,strerror(errno));
       exit(EXIT_FAILURE);
     }
-    mysnprintf(buffer,sizeof(buffer),"%d\n",(int)getpid());
+    mysnprintf(buffer,sizeof(buffer),"%lu\n",(unsigned long int)getpid());
     if (write(fd,buffer,strlen(buffer))!=(int)strlen(buffer))
     {
       log_log(LOG_ERR,"error writing pid file (%s): %s",filename,strerror(errno));
@@ -755,11 +755,11 @@ int main(int argc,char *argv[])
 #ifdef HAVE_INITGROUPS
     /* load supplementary groups */
     if (initgroups(nslcd_cfg->ldc_uidname,nslcd_cfg->ldc_gid)<0)
-      log_log(LOG_WARNING,"cannot initgroups(\"%s\",%d) (ignored): %s",
-              nslcd_cfg->ldc_uidname,(int)nslcd_cfg->ldc_gid,strerror(errno));
+      log_log(LOG_WARNING,"cannot initgroups(\"%s\",%lu) (ignored): %s",
+              nslcd_cfg->ldc_uidname,(unsigned long int)nslcd_cfg->ldc_gid,strerror(errno));
     else
-      log_log(LOG_DEBUG,"initgroups(\"%s\",%d) done",
-              nslcd_cfg->ldc_uidname,(int)nslcd_cfg->ldc_gid);
+      log_log(LOG_DEBUG,"initgroups(\"%s\",%lu) done",
+              nslcd_cfg->ldc_uidname,(unsigned long int)nslcd_cfg->ldc_gid);
 #else /* not HAVE_INITGROUPS */
 #ifdef HAVE_SETGROUPS
     /* just drop all supplemental groups */
@@ -777,20 +777,22 @@ int main(int argc,char *argv[])
   {
     if (setgid(nslcd_cfg->ldc_gid)!=0)
     {
-      log_log(LOG_ERR,"cannot setgid(%d): %s",(int)nslcd_cfg->ldc_gid,strerror(errno));
+      log_log(LOG_ERR,"cannot setgid(%lu): %s",
+			  (unsigned long int)nslcd_cfg->ldc_gid,strerror(errno));
       exit(EXIT_FAILURE);
     }
-    log_log(LOG_DEBUG,"setgid(%d) done",(int)nslcd_cfg->ldc_gid);
+    log_log(LOG_DEBUG,"setgid(%lu) done",(unsigned long int)nslcd_cfg->ldc_gid);
   }
   /* change to nslcd uid */
   if (nslcd_cfg->ldc_uid!=NOUID)
   {
     if (setuid(nslcd_cfg->ldc_uid)!=0)
     {
-      log_log(LOG_ERR,"cannot setuid(%d): %s",(int)nslcd_cfg->ldc_uid,strerror(errno));
+      log_log(LOG_ERR,"cannot setuid(%lu): %s",
+			  (unsigned long int)nslcd_cfg->ldc_uid,strerror(errno));
       exit(EXIT_FAILURE);
     }
-    log_log(LOG_DEBUG,"setuid(%d) done",(int)nslcd_cfg->ldc_uid);
+    log_log(LOG_DEBUG,"setuid(%lu) done",(unsigned long int)nslcd_cfg->ldc_uid);
   }
   /* block all these signals so our worker threads won't handle them */
   sigemptyset(&signalmask);
diff -up nss-pam-ldapd-0.8.13/nslcd/passwd.c.uid_formatting nss-pam-ldapd-0.8.13/nslcd/passwd.c
--- nss-pam-ldapd-0.8.13/nslcd/passwd.c.uid_formatting	2013-02-23 22:24:00.000000000 +0100
+++ nss-pam-ldapd-0.8.13/nslcd/passwd.c	2017-10-24 14:17:27.490696766 +0200
@@ -115,10 +115,8 @@ static int mkfilter_passwd_byuid(uid_t u
   }
   else
   {
-    return mysnprintf(buffer,buflen,
-                      "(&%s(%s=%d))",
-                      passwd_filter,
-                      attmap_passwd_uidNumber,(int)uid);
+    return mysnprintf(buffer,buflen, "(&%s(%s=%lu))",
+                      passwd_filter,attmap_passwd_uidNumber,(unsigned long int)uid);
   }
 }