]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
(krb5_ldap_put_principal): Add parens around assignment in equality test.
authorKen Raeburn <raeburn@mit.edu>
Thu, 15 Jun 2006 21:10:09 +0000 (21:10 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 15 Jun 2006 21:10:09 +0000 (21:10 +0000)
(getstringtime): Don't assume time_t and krb5_timestamp are the same type; copy
the value.  (No overflow check done.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/ldap-integ@18145 dc483132-0cff-0310-8789-dd5450dbe970

src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c

index 4b15e2320de03459e30a3289b1fa452bf98c1505..6509ff9e7f1053bedfad2dc5d2921c4aa7d78fcf 100644 (file)
@@ -932,7 +932,7 @@ krb5_ldap_put_principal(context, entries, nentries, db_args)
                char *subtreednlist[2]={NULL};
                krb5_boolean dnoutofsubtree=TRUE;
 
-               if(st=krb5_get_policydn(context, entries, &oldpolicydn) != 0)
+               if ((st=krb5_get_policydn(context, entries, &oldpolicydn)) != 0)
                        goto cleanup;
                
                if (strlen(xargs.tktpolicydn) != 0) {
@@ -1281,12 +1281,13 @@ getstringtime(epochtime)
 {
     struct tm           tme;
     char                *strtime=NULL;
+    time_t             posixtime = epochtime;
     
     strtime = calloc (50, 1);
     if (strtime == NULL)
        return NULL;
     
-    if (gmtime_r((const time_t *)&epochtime, &tme) == NULL)
+    if (gmtime_r(&posixtime, &tme) == NULL)
        return NULL;
     
     strftime(strtime, 50, "%Y%m%d%H%M%SZ", &tme);