Deleted Added
full compact
comsat.c (202208) comsat.c (222825)
1/*
2 * Copyright (c) 1980, 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

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1980, 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

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/libexec/comsat/comsat.c 202208 2010-01-13 18:25:43Z ed $";
45 "$FreeBSD: head/libexec/comsat/comsat.c 222825 2011-06-07 16:23:27Z jh $";
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/socket.h>
50#include <sys/stat.h>
51#include <sys/file.h>
52#include <sys/wait.h>
53

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

175 return;
176 }
177 (void)snprintf(tty, sizeof(tty), "%s%.*s",
178 _PATH_DEV, (int)sizeof(utp->ut_line), utp->ut_line);
179 if (stat(tty, &stb) == -1 || !(stb.st_mode & (S_IXUSR | S_IXGRP))) {
180 dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_user, tty);
181 return;
182 }
46#endif /* not lint */
47
48#include <sys/param.h>
49#include <sys/socket.h>
50#include <sys/stat.h>
51#include <sys/file.h>
52#include <sys/wait.h>
53

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

175 return;
176 }
177 (void)snprintf(tty, sizeof(tty), "%s%.*s",
178 _PATH_DEV, (int)sizeof(utp->ut_line), utp->ut_line);
179 if (stat(tty, &stb) == -1 || !(stb.st_mode & (S_IXUSR | S_IXGRP))) {
180 dsyslog(LOG_DEBUG, "%s: wrong mode on %s", utp->ut_user, tty);
181 return;
182 }
183 dsyslog(LOG_DEBUG, "notify %s on %s\n", utp->ut_user, tty);
183 dsyslog(LOG_DEBUG, "notify %s on %s", utp->ut_user, tty);
184 switch (fork()) {
185 case -1:
186 syslog(LOG_NOTICE, "fork failed (%m)");
187 return;
188 case 0:
189 break;
190 default:
191 return;

--- 97 unchanged lines hidden ---
184 switch (fork()) {
185 case -1:
186 syslog(LOG_NOTICE, "fork failed (%m)");
187 return;
188 case 0:
189 break;
190 default:
191 return;

--- 97 unchanged lines hidden ---