Deleted Added
full compact
id.c (36450) id.c (36467)
1/*-
2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3 * 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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: id.c,v 1.8 1998/05/21 21:45:32 brian Exp $
26 * $Id: id.c,v 1.9 1998/05/28 23:15:36 brian Exp $
27 */
28
29#include <sys/types.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32
33#include <sys/ioctl.h>
34#include <fcntl.h>
27 */
28
29#include <sys/types.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32
33#include <sys/ioctl.h>
34#include <fcntl.h>
35#include <signal.h>
35#include <stdarg.h>
36#include <stdio.h>
37#include <string.h>
38#include <sysexits.h>
39#include <unistd.h>
40#ifdef __OpenBSD__
41#include <util.h>
42#else

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

247
248 ID0set0();
249 result = connect(s, (const struct sockaddr *)name, sizeof *name);
250 log_Printf(LogID0, "%d = connect(%d, \"%s\", %d)\n",
251 result, s, name->sun_path, sizeof *name);
252 ID0setuser();
253 return result;
254}
36#include <stdarg.h>
37#include <stdio.h>
38#include <string.h>
39#include <sysexits.h>
40#include <unistd.h>
41#ifdef __OpenBSD__
42#include <util.h>
43#else

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

248
249 ID0set0();
250 result = connect(s, (const struct sockaddr *)name, sizeof *name);
251 log_Printf(LogID0, "%d = connect(%d, \"%s\", %d)\n",
252 result, s, name->sun_path, sizeof *name);
253 ID0setuser();
254 return result;
255}
256
257int
258ID0kill(pid_t pid, int sig)
259{
260 int result;
261
262 ID0set0();
263 result = kill(pid, sig);
264 log_Printf(LogID0, "%d = kill(%d, %d)\n", result, (int)pid, sig);
265 ID0setuser();
266 return result;
267}