Deleted Added
full compact
util.c (79452) util.c (80818)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. 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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. 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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/bin/rcp/util.c 79452 2001-07-09 09:24:06Z brian $";
39 "$FreeBSD: head/bin/rcp/util.c 80818 2001-08-01 05:12:39Z obrien $";
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44#include <sys/wait.h>
45
46#include <ctype.h>
47#include <err.h>

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

93 int c;
94 char *cp;
95
96 cp = cp0;
97 do {
98 c = *cp;
99 if (c & 0200)
100 goto bad;
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44#include <sys/wait.h>
45
46#include <ctype.h>
47#include <err.h>

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

93 int c;
94 char *cp;
95
96 cp = cp0;
97 do {
98 c = *cp;
99 if (c & 0200)
100 goto bad;
101 if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-' && c != '.' )
101 if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-' && c != '.')
102 goto bad;
103 } while (*++cp);
104 return (1);
105
106bad: warnx("%s: invalid user name", cp0);
107 return (0);
108}
109

--- 62 unchanged lines hidden ---
102 goto bad;
103 } while (*++cp);
104 return (1);
105
106bad: warnx("%s: invalid user name", cp0);
107 return (0);
108}
109

--- 62 unchanged lines hidden ---