]> git.sur5r.net Git - openldap/commitdiff
do not allow slapo-ppolicy to be global by now (ITS#5858)
authorPierangelo Masarati <ando@openldap.org>
Sat, 20 Dec 2008 22:02:06 +0000 (22:02 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 20 Dec 2008 22:02:06 +0000 (22:02 +0000)
servers/slapd/overlays/ppolicy.c

index 54607e2e81cc9ef0b136ee7478e5e7624c4ed7a2..05939ce986a3fe47cdbddcd6800a61bef9837709 100644 (file)
@@ -2094,6 +2094,16 @@ ppolicy_db_init(
 {
        slap_overinst *on = (slap_overinst *) be->bd_info;
 
+       if ( SLAP_ISGLOBALOVERLAY( be ) ) {
+               /* do not allow slapo-ppolicy to be global by now (ITS#5858) */
+               if ( cr ){
+                       snprintf( cr->msg, sizeof(cr->msg), 
+                               "slapo-ppolicy cannot be global" );
+                       fprintf( stderr, "%s\n", cr->msg );
+               }
+               return 1;
+       }
+
        /* Has User Schema been initialized yet? */
        if ( !pwd_UsSchema[0].ad[0] ) {
                const char *err;