[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.11, 1.12 acl.h, 1.5, 1.6 acl_ext.c, 1.8, 1.9 aclanom.c, 1.7, 1.8

Nathan Kinder nkinder at fedoraproject.org
Fri Oct 17 22:12:49 UTC 2008


Author: nkinder

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11144/ldap/servers/plugins/acl

Modified Files:
	acl.c acl.h acl_ext.c aclanom.c 
Log Message:
Related: 207457
Summary: Add support for 64-bit counters (phase 1).



Index: acl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- acl.c	30 Jun 2008 17:28:16 -0000	1.11
+++ acl.c	17 Oct 2008 22:12:46 -0000	1.12
@@ -297,7 +297,7 @@
 
 		 if (  !privateBackend && (be_readonly ||  slapi_config_get_readonly () )){
 			slapi_log_error	(loglevel, plugin_name,
-				"conn=%d op=%d (main): Deny %s on entry(%s)"
+				"conn=%" PRIu64 " op=%d (main): Deny %s on entry(%s)"
 				": readonly backend\n",
 				 op->o_connid, op->o_opid,
 				acl_access2str(access),
@@ -310,7 +310,7 @@
 	TNF_PROBE_0_DEBUG(acl_skipaccess_start,"ACL","");
 	if (  acl_skip_access_check ( pb, e )) {
 		slapi_log_error	(loglevel,	plugin_name,
-				"conn=%d op=%d (main): Allow %s on entry(%s)"
+				"conn=%" PRIu64 " op=%d (main): Allow %s on entry(%s)"
 				": root user\n",
 				op->o_connid, op->o_opid,
 				acl_access2str(access),
@@ -438,7 +438,7 @@
 		TNF_PROBE_0_DEBUG(acl_entry_first_touch_start,"ACL","");
 
 		slapi_log_error(loglevel, plugin_name,
-			"#### conn=%d op=%d binddn=\"%s\"\n",
+			"#### conn=%" PRIu64 " op=%d binddn=\"%s\"\n",
 			op->o_connid, op->o_opid, clientDn);
 		aclpb->aclpb_stat_total_entries++;
 
@@ -755,7 +755,7 @@
 										null_user);
 
 				slapi_log_error(loglevel, plugin_name, 
-		"conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
+		"conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
 		": %s\n",
 				op->o_connid, op->o_opid,
 				source,
@@ -768,7 +768,7 @@
 		} else {
 					proxy_user = null_user;
 					slapi_log_error(loglevel, plugin_name, 
-		"conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
+		"conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to proxy (%s)"
 		": %s\n",
 				op->o_connid, op->o_opid,
 				source,
@@ -781,7 +781,7 @@
 		}
 	} else{
 		slapi_log_error(loglevel, plugin_name, 
-			"conn=%d op=%d (%s): %s %s on entry(%s).attr(%s) to %s"
+			"conn=%" PRIu64 " op=%d (%s): %s %s on entry(%s).attr(%s) to %s"
 			": %s\n",
 				op->o_connid, op->o_opid,
 				source,


Index: acl.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- acl.h	10 Nov 2006 23:44:49 -0000	1.5
+++ acl.h	17 Oct 2008 22:12:47 -0000	1.6
@@ -49,6 +49,22 @@
 #ifndef _ACL_H_
 #define _ACL_H_
 
+/* Required to get portable printf/scanf format macros */
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+
+/* NSPR uses the print macros a bit differently than ANSI C.  We
+ * need to use ll for a 64-bit integer, even when a long is 64-bit.
+ */
+#undef PRIu64
+#define PRIu64  "llu"
+#undef PRI64
+#define PRI64   "ll"
+
+#else
+#error Need to define portable format macros such as PRIu64
+#endif /* HAVE_INTTYPES_H */
+
 #include 	<stdio.h>
 #include 	<string.h>
 #include 	<sys/types.h>


Index: acl_ext.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- acl_ext.c	3 Apr 2008 17:18:10 -0000	1.8
+++ acl_ext.c	17 Oct 2008 22:12:47 -0000	1.9
@@ -973,7 +973,7 @@
 static void
 acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type)
 {
-	int 			connid = 0;
+	PRUint64 			connid = 0;
 	int				opid = 0;
 	Slapi_PBlock  	*pb = NULL;
 
@@ -985,7 +985,7 @@
 
 	/* DUMP STAT INFO */
 	slapi_log_error( SLAPI_LOG_ACL, plugin_name, 
-			"**** ACL OPERATION STAT BEGIN ( aclpb:%p Block type: %s): Conn:%d Operation:%d  *******\n",
+			"**** ACL OPERATION STAT BEGIN ( aclpb:%p Block type: %s): Conn:%" PRIu64 " Operation:%d  *******\n",
 			aclpb, block_type, connid, opid );
 	slapi_log_error( SLAPI_LOG_ACL, plugin_name, "\tNumber of entries scanned: %d\n",
 					aclpb->aclpb_stat_total_entries);


Index: aclanom.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclanom.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- aclanom.c	19 Oct 2007 15:36:01 -0000	1.7
+++ aclanom.c	17 Oct 2008 22:12:47 -0000	1.8
@@ -543,14 +543,14 @@
 			aci_ndn = slapi_sdn_get_ndn (acl_anom_profile->anom_targetinfo[i].anom_target);
 
 			slapi_log_error(loglevel, plugin_name, 
-				"conn=%d op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n",
+				"conn=%" PRIu64 " op=%d: Allow access on entry(%s).attr(%s) to anonymous: acidn=\"%s\"\n",
 				op->o_connid, op->o_opid,
 				escape_string_with_punctuation(ndn, ebuf),
 				attr ? attr:"NULL",
 				escape_string_with_punctuation(aci_ndn, ebuf));
 		} else {
 			slapi_log_error(loglevel, plugin_name,
-				"conn=%d op=%d: Deny access on entry(%s).attr(%s) to anonymous\n",
+				"conn=%" PRIu64 " op=%d: Deny access on entry(%s).attr(%s) to anonymous\n",
 		op->o_connid, op->o_opid,
                 escape_string_with_punctuation(ndn, ebuf), attr ? attr:"NULL" );
 		}




More information about the Fedora-directory-commits mailing list