ypxfr_main.c (228600) | ypxfr_main.c (283844) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 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 --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/libexec/ypxfr/ypxfr_main.c 228600 2011-12-16 22:05:10Z dim $"); | 34__FBSDID("$FreeBSD: head/libexec/ypxfr/ypxfr_main.c 283844 2015-05-31 22:20:36Z rodrigc $"); |
35 36#include <errno.h> 37#include <stdio.h> 38#include <stdlib.h> 39#include <string.h> 40#include <syslog.h> 41#include <unistd.h> 42#include <sys/types.h> --- 309 unchanged lines hidden (view full) --- 352 ypxfr_source_host); 353 ypxfr_exit(YPXFR_REFUSED, NULL); 354 } 355 356 if ((ypxfr_order = ypxfr_get_order(ypxfr_source_domain, 357 ypxfr_mapname, 358 ypxfr_master, 0)) == 0) { 359 yp_error("failed to get order number of %s: %s", | 35 36#include <errno.h> 37#include <stdio.h> 38#include <stdlib.h> 39#include <string.h> 40#include <syslog.h> 41#include <unistd.h> 42#include <sys/types.h> --- 309 unchanged lines hidden (view full) --- 352 ypxfr_source_host); 353 ypxfr_exit(YPXFR_REFUSED, NULL); 354 } 355 356 if ((ypxfr_order = ypxfr_get_order(ypxfr_source_domain, 357 ypxfr_mapname, 358 ypxfr_master, 0)) == 0) { 359 yp_error("failed to get order number of %s: %s", |
360 ypxfr_mapname, yp_errno == YPXFR_SUCC ? | 360 ypxfr_mapname, yp_errno == YP_TRUE ? |
361 "map has order 0" : 362 ypxfrerr_string((ypxfrstat)yp_errno)); 363 ypxfr_exit(YPXFR_YPERR,NULL); 364 } 365 366 if (ypxfr_match(ypxfr_master, ypxfr_source_domain, ypxfr_mapname, 367 "YP_INTERDOMAIN", sizeof("YP_INTERDOMAIN") - 1)) 368 interdom++; --- 159 unchanged lines hidden (view full) --- 528 snprintf(buf, sizeof(buf), "%s/%s/%s", yp_dir, ypxfr_dest_domain, 529 ypxfr_mapname); 530 531 /* Peek at the order number again and check for skew. */ 532 if ((ypxfr_skew_check = ypxfr_get_order(ypxfr_source_domain, 533 ypxfr_mapname, 534 ypxfr_master, 0)) == 0) { 535 yp_error("failed to get order number of %s: %s", | 361 "map has order 0" : 362 ypxfrerr_string((ypxfrstat)yp_errno)); 363 ypxfr_exit(YPXFR_YPERR,NULL); 364 } 365 366 if (ypxfr_match(ypxfr_master, ypxfr_source_domain, ypxfr_mapname, 367 "YP_INTERDOMAIN", sizeof("YP_INTERDOMAIN") - 1)) 368 interdom++; --- 159 unchanged lines hidden (view full) --- 528 snprintf(buf, sizeof(buf), "%s/%s/%s", yp_dir, ypxfr_dest_domain, 529 ypxfr_mapname); 530 531 /* Peek at the order number again and check for skew. */ 532 if ((ypxfr_skew_check = ypxfr_get_order(ypxfr_source_domain, 533 ypxfr_mapname, 534 ypxfr_master, 0)) == 0) { 535 yp_error("failed to get order number of %s: %s", |
536 ypxfr_mapname, yp_errno == YPXFR_SUCC ? | 536 ypxfr_mapname, yp_errno == YP_TRUE ? |
537 "map has order 0" : 538 ypxfrerr_string((ypxfrstat)yp_errno)); 539 ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); 540 } 541 542 if (ypxfr_order != ypxfr_skew_check) 543 ypxfr_exit(YPXFR_SKEW,ypxfr_temp_map); 544 --- 33 unchanged lines hidden --- | 537 "map has order 0" : 538 ypxfrerr_string((ypxfrstat)yp_errno)); 539 ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); 540 } 541 542 if (ypxfr_order != ypxfr_skew_check) 543 ypxfr_exit(YPXFR_SKEW,ypxfr_temp_map); 544 --- 33 unchanged lines hidden --- |