]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/cyrus.c
#include <ac/unistd.h>, to get geteuid() and getegid().
[openldap] / libraries / libldap / cyrus.c
index 19a7a078862c1b4d89cf6ca8db5a2d9406ece8c7..1816d8d7c386129a2bb9064c22f59be30265a0cf 100644 (file)
@@ -14,6 +14,7 @@
 #include <ac/time.h>
 #include <ac/errno.h>
 #include <ac/ctype.h>
+#include <ac/unistd.h>
 
 #include "ldap-int.h"
 
@@ -67,7 +68,7 @@ int ldap_int_sasl_init( void )
        if ( ((rc >> 16) != ((SASL_VERSION_MAJOR << 8)|SASL_VERSION_MINOR)) ||
                (rc & 0xffff) < SASL_VERSION_STEP) {
                char version[sizeof("xxx.xxx.xxxxx")];
-               sprintf( version, "%d.%d.%d", rc >> 24, rc >> 16 * 0xff,
+               sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
                        rc & 0xffff );
 
 #ifdef NEW_LOGGING
@@ -153,7 +154,7 @@ sb_sasl_setup( Sockbuf_IO_Desc *sbiod, void *arg )
        }
        sasl_getprop( p->sasl_context, SASL_MAXOUTBUF,
                (SASL_CONST void **) &p->sasl_maxbuf );
-
+           
        sbiod->sbiod_pvt = p;
 
        return 0;