Deleted Added
full compact
misc.c (60825) misc.c (94389)
1/* Copyright 1988,1990,1993,1994 by Paul Vixie
2 * All rights reserved
3 *
4 * Distribute freely, except: don't remove my name from the source or
5 * documentation (don't take credit for my work), mark your changes (don't
6 * get me blamed for your possible bugs), don't alter or remove this
7 * notice. May be sold if buildable source is provided to buyer. No
8 * warrantee of any kind, express or implied, is included with this
9 * software; use at your own risk, responsibility for damages (if any) to
10 * anyone resulting from the use of this software rests entirely with the
11 * user.
12 *
13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14 * I'll try to keep a version up to date. I can be reached as follows:
15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul
16 */
17
18#if !defined(lint) && !defined(LINT)
19static const char rcsid[] =
1/* Copyright 1988,1990,1993,1994 by Paul Vixie
2 * All rights reserved
3 *
4 * Distribute freely, except: don't remove my name from the source or
5 * documentation (don't take credit for my work), mark your changes (don't
6 * get me blamed for your possible bugs), don't alter or remove this
7 * notice. May be sold if buildable source is provided to buyer. No
8 * warrantee of any kind, express or implied, is included with this
9 * software; use at your own risk, responsibility for damages (if any) to
10 * anyone resulting from the use of this software rests entirely with the
11 * user.
12 *
13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14 * I'll try to keep a version up to date. I can be reached as follows:
15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul
16 */
17
18#if !defined(lint) && !defined(LINT)
19static const char rcsid[] =
20 "$FreeBSD: head/usr.sbin/cron/lib/misc.c 60825 2000-05-23 13:44:00Z ghelmer $";
20 "$FreeBSD: head/usr.sbin/cron/lib/misc.c 94389 2002-04-10 22:01:37Z dwmalone $";
21#endif
22
23/* vix 26jan87 [RCS has the rest of the log]
24 * vix 30dec86 [written]
25 */
26
27
28#include "cron.h"

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

387 char *string;
388 FILE *file;
389{
390 char line[MAX_TEMPSTR];
391
392 rewind(file);
393 while (fgets(line, MAX_TEMPSTR, file)) {
394 if (line[0] != '\0')
21#endif
22
23/* vix 26jan87 [RCS has the rest of the log]
24 * vix 30dec86 [written]
25 */
26
27
28#include "cron.h"

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

387 char *string;
388 FILE *file;
389{
390 char line[MAX_TEMPSTR];
391
392 rewind(file);
393 while (fgets(line, MAX_TEMPSTR, file)) {
394 if (line[0] != '\0')
395 line[strlen(line)-1] = '\0';
395 if (line[strlen(line)-1] == '\n')
396 line[strlen(line)-1] = '\0';
396 if (0 == strcmp(line, string))
397 return TRUE;
398 }
399 return FALSE;
400}
401
402
403/* int allowed(char *username)

--- 251 unchanged lines hidden ---
397 if (0 == strcmp(line, string))
398 return TRUE;
399 }
400 return FALSE;
401}
402
403
404/* int allowed(char *username)

--- 251 unchanged lines hidden ---