Deleted Added
full compact
util.c (77491) util.c (79452)
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 77491 2001-05-30 16:19:13Z pirzyk $";
39 "$FreeBSD: head/bin/rcp/util.c 79452 2001-07-09 09:24:06Z brian $";
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>

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

118
119 pid = vfork();
120 switch (pid) {
121 case -1:
122 return (127);
123
124 case 0:
125 (void)setuid(userid);
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>

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

118
119 pid = vfork();
120 switch (pid) {
121 case -1:
122 return (127);
123
124 case 0:
125 (void)setuid(userid);
126 execl(_PATH_BSHELL, "sh", "-c", s, NULL);
126 execl(_PATH_BSHELL, "sh", "-c", s, (char *)NULL);
127 _exit(127);
128 }
129 istat = signal(SIGINT, SIG_IGN);
130 qstat = signal(SIGQUIT, SIG_IGN);
131 if (waitpid(pid, &status, 0) < 0)
132 status = -1;
133 (void)signal(SIGINT, istat);
134 (void)signal(SIGQUIT, qstat);

--- 37 unchanged lines hidden ---
127 _exit(127);
128 }
129 istat = signal(SIGINT, SIG_IGN);
130 qstat = signal(SIGQUIT, SIG_IGN);
131 if (waitpid(pid, &status, 0) < 0)
132 status = -1;
133 (void)signal(SIGINT, istat);
134 (void)signal(SIGQUIT, qstat);

--- 37 unchanged lines hidden ---