From: Hallvard Furuseth Date: Tue, 3 Jun 2003 17:31:25 +0000 (+0000) Subject: Do not set op->o_private (to the process' pid). Only abandon needed it. X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~943 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa90e4aade13e31b9829ba750635f6aa100e3e40;p=openldap Do not set op->o_private (to the process' pid). Only abandon needed it. --- diff --git a/servers/slapd/back-shell/add.c b/servers/slapd/back-shell/add.c index 31c83e487b..368404ebf3 100644 --- a/servers/slapd/back-shell/add.c +++ b/servers/slapd/back-shell/add.c @@ -38,7 +38,7 @@ shell_back_add( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_add, &rfp, &wfp )) == (void *) -1 ) { + if ( forkandexec( si->si_add, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/bind.c b/servers/slapd/back-shell/bind.c index 0acca761ce..d777394c69 100644 --- a/servers/slapd/back-shell/bind.c +++ b/servers/slapd/back-shell/bind.c @@ -48,8 +48,7 @@ shell_back_bind( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_bind, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_bind, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/compare.c b/servers/slapd/back-shell/compare.c index 09ffb4d4aa..1a840ef296 100644 --- a/servers/slapd/back-shell/compare.c +++ b/servers/slapd/back-shell/compare.c @@ -47,8 +47,7 @@ shell_back_compare( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_compare, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_compare, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/delete.c b/servers/slapd/back-shell/delete.c index 3daec4c898..d33ef12220 100644 --- a/servers/slapd/back-shell/delete.c +++ b/servers/slapd/back-shell/delete.c @@ -47,8 +47,7 @@ shell_back_delete( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_delete, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_delete, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/modify.c b/servers/slapd/back-shell/modify.c index 248a64dc45..906ee6093c 100644 --- a/servers/slapd/back-shell/modify.c +++ b/servers/slapd/back-shell/modify.c @@ -50,8 +50,7 @@ shell_back_modify( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_modify, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_modify, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/modrdn.c b/servers/slapd/back-shell/modrdn.c index f24831e3ac..ddffb91493 100644 --- a/servers/slapd/back-shell/modrdn.c +++ b/servers/slapd/back-shell/modrdn.c @@ -60,8 +60,7 @@ shell_back_modrdn( return -1; } - if ( (op->o_private = (void *) forkandexec( si->si_modrdn, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_modrdn, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/search.c b/servers/slapd/back-shell/search.c index a80d9502cf..13c073090f 100644 --- a/servers/slapd/back-shell/search.c +++ b/servers/slapd/back-shell/search.c @@ -30,8 +30,7 @@ shell_back_search( return( -1 ); } - if ( (op->o_private = (void *) forkandexec( si->si_search, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_search, &rfp, &wfp ) == (pid_t)-1 ) { send_ldap_error( op, rs, LDAP_OTHER, "could not fork/exec" ); return( -1 ); diff --git a/servers/slapd/back-shell/unbind.c b/servers/slapd/back-shell/unbind.c index 221b0f83a3..005b8640f0 100644 --- a/servers/slapd/back-shell/unbind.c +++ b/servers/slapd/back-shell/unbind.c @@ -28,8 +28,7 @@ shell_back_unbind( return 0; } - if ( (op->o_private = (void *) forkandexec( si->si_unbind, &rfp, &wfp )) - == (void *) -1 ) { + if ( forkandexec( si->si_unbind, &rfp, &wfp ) == (pid_t)-1 ) { return 0; }