+ BackendDB *bd;
+
+ switch ( argc ) {
+ case 3:
+ if ( strcmp( argv[ 2 ], "massage" ) != 0 ) {
+ Log3( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: "
+ "unknown arg[#2]=\"%s\" "
+ "in \"relay <dn> [massage]\" line\n",
+ fname, lineno, argv[ 2 ] );
+ return 1;
+ }
+
+ if ( be->be_nsuffix == NULL ) {
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: "
+ "\"relay\" directive "
+ "must appear after \"suffix\".\n",
+ fname, lineno );
+ return 1;
+ }
+
+ if ( !BER_BVISNULL( &be->be_nsuffix[ 1 ] ) ) {
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: "
+ "relayng of multiple suffix "
+ "database not supported.\n",
+ fname, lineno );
+ return 1;
+ }
+ /* fallthru */
+
+ case 2:
+ break;
+
+ case 1:
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: missing relay suffix "
+ "in \"relay <dn> [massage]\" line.\n",
+ fname, lineno );
+ return 1;
+
+ default:
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: extra cruft "
+ "in \"relay <dn> [massage]\" line.\n",
+ fname, lineno );
+ return 1;
+ }