Deleted Added
full compact
ypxfr_main.c (50476) ypxfr_main.c (90297)
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

--- 18 unchanged lines hidden (view full) ---

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#ifndef lint
34static const char rcsid[] =
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

--- 18 unchanged lines hidden (view full) ---

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#ifndef lint
34static const char rcsid[] =
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_main.c 50476 1999-08-28 00:22:10Z peter $";
35 "$FreeBSD: head/libexec/ypxfr/ypxfr_main.c 90297 2002-02-06 13:30:31Z des $";
36#endif /* not lint */
37
38#include <errno.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <syslog.h>
43#include <unistd.h>

--- 146 unchanged lines hidden (view full) ---

190 _rpcpmstart = 1;
191 }
192
193 if (argc < 2)
194 usage();
195
196 while ((ch = getopt(argc, argv, "fcd:h:s:p:C:")) != -1) {
197 int my_optind;
36#endif /* not lint */
37
38#include <errno.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <syslog.h>
43#include <unistd.h>

--- 146 unchanged lines hidden (view full) ---

190 _rpcpmstart = 1;
191 }
192
193 if (argc < 2)
194 usage();
195
196 while ((ch = getopt(argc, argv, "fcd:h:s:p:C:")) != -1) {
197 int my_optind;
198 switch(ch) {
198 switch (ch) {
199 case 'f':
200 ypxfr_force++;
201 ypxfr_args++;
202 break;
203 case 'c':
204 ypxfr_clear = 0;
205 ypxfr_args++;
206 break;

--- 169 unchanged lines hidden (view full) ---

376 interdom++;
377
378 if (ypxfr_match(ypxfr_master, ypxfr_source_domain, ypxfr_mapname,
379 "YP_SECURE", sizeof("YP_SECURE") - 1))
380 secure++;
381
382 key.data = "YP_LAST_MODIFIED";
383 key.size = sizeof("YP_LAST_MODIFIED") - 1;
199 case 'f':
200 ypxfr_force++;
201 ypxfr_args++;
202 break;
203 case 'c':
204 ypxfr_clear = 0;
205 ypxfr_args++;
206 break;

--- 169 unchanged lines hidden (view full) ---

376 interdom++;
377
378 if (ypxfr_match(ypxfr_master, ypxfr_source_domain, ypxfr_mapname,
379 "YP_SECURE", sizeof("YP_SECURE") - 1))
380 secure++;
381
382 key.data = "YP_LAST_MODIFIED";
383 key.size = sizeof("YP_LAST_MODIFIED") - 1;
384
384
385 /* The order number is immaterial when the 'force' flag is set. */
386
387 if (!ypxfr_force) {
388 int ignore = 0;
389 if (yp_get_record(ypxfr_dest_domain,ypxfr_mapname,&key,&data,1) != YP_TRUE) {
385 /* The order number is immaterial when the 'force' flag is set. */
386
387 if (!ypxfr_force) {
388 int ignore = 0;
389 if (yp_get_record(ypxfr_dest_domain,ypxfr_mapname,&key,&data,1) != YP_TRUE) {
390 switch(yp_errno) {
390 switch (yp_errno) {
391 case YP_NOKEY:
392 ypxfr_exit(YPXFR_FORCE,NULL);
393 break;
394 case YP_NOMAP:
395 /*
396 * If the map doesn't exist, we're
397 * creating it. Ignore the error.
398 */

--- 186 unchanged lines hidden ---
391 case YP_NOKEY:
392 ypxfr_exit(YPXFR_FORCE,NULL);
393 break;
394 case YP_NOMAP:
395 /*
396 * If the map doesn't exist, we're
397 * creating it. Ignore the error.
398 */

--- 186 unchanged lines hidden ---