yp_server.c (46186) | yp_server.c (46205) |
---|---|
1/* 2 * Copyright (c) 1995 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 378 unchanged lines hidden (view full) --- 387 "-h", mres->peer, 388 "-C", t, 389 g, inet_ntoa(rqhost->sin_addr), 390 p, argp->map_parms.map, 391 NULL); 392 } 393 yp_error("ypxfr execl(%s): %s", ypxfr_command, strerror(errno)); 394 YPXFR_RETURN(YPXFR_XFRERR) | 1/* 2 * Copyright (c) 1995 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 378 unchanged lines hidden (view full) --- 387 "-h", mres->peer, 388 "-C", t, 389 g, inet_ntoa(rqhost->sin_addr), 390 p, argp->map_parms.map, 391 NULL); 392 } 393 yp_error("ypxfr execl(%s): %s", ypxfr_command, strerror(errno)); 394 YPXFR_RETURN(YPXFR_XFRERR) |
395 /* 396 * Just to safe, prevent PR #10970 from biting us in 397 * the unlikely case that execing ypxfr fails. We don't 398 * want to have any child processes spawned from this 399 * child process. 400 */ 401 _exit(0); |
|
395 break; 396 } 397 case -1: 398 yp_error("ypxfr fork(): %s", strerror(errno)); 399 YPXFR_RETURN(YPXFR_XFRERR) 400 break; 401 default: 402 result.xfrstat = YPXFR_SUCC; --- 132 unchanged lines hidden (view full) --- 535 result.ypresp_all_u.val.stat = yp_errno; 536 return(&result); 537 } 538 539 /* Kick off the actual data transfer. */ 540 svc_sendreply(rqstp->rq_xprt, xdr_my_ypresp_all, (char *)&result); 541 542 /* | 402 break; 403 } 404 case -1: 405 yp_error("ypxfr fork(): %s", strerror(errno)); 406 YPXFR_RETURN(YPXFR_XFRERR) 407 break; 408 default: 409 result.xfrstat = YPXFR_SUCC; --- 132 unchanged lines hidden (view full) --- 542 result.ypresp_all_u.val.stat = yp_errno; 543 return(&result); 544 } 545 546 /* Kick off the actual data transfer. */ 547 svc_sendreply(rqstp->rq_xprt, xdr_my_ypresp_all, (char *)&result); 548 549 /* |
543 * Returning NULL prevents the dispatcher from calling 544 * svc_sendreply() since we already did it. | 550 * Proper fix for PR #10970: exit here so that we don't risk 551 * having a child spawned from this sub-process. |
545 */ | 552 */ |
546 return (NULL); | 553 _exit(0); |
547} 548 549ypresp_master * 550ypproc_master_2_svc(ypreq_nokey *argp, struct svc_req *rqstp) 551{ 552 static ypresp_master result; 553 static char ypvalbuf[YPMAXRECORD]; 554 keydat key = { MASTER_SZ, MASTER_STRING }; --- 413 unchanged lines hidden --- | 554} 555 556ypresp_master * 557ypproc_master_2_svc(ypreq_nokey *argp, struct svc_req *rqstp) 558{ 559 static ypresp_master result; 560 static char ypvalbuf[YPMAXRECORD]; 561 keydat key = { MASTER_SZ, MASTER_STRING }; --- 413 unchanged lines hidden --- |