dwmalone
1b2d9d1890
Try to be more careful about using using the file descriptor f_file.
...
Syslogd should ensure that f_file is a valid file descriptor when
f_type is FILE, CONSOLE, TTY and for a PIPE where f_pid > 0. If the
descriptor is closed/invalid then the type should be set to UNUSED
or the pid should be set to 0.
To this end:
1) Don't close(f->f_file) if we can't send a message to a remote
host because the file descriptor used for remote logging is
stored in finet, not in f->f_file. f->f_file is probably
uninitialised, so I guess we usually end up closing fd 0.
2) Don't close PIPE file descriptors if they are invalid.
3) If the call to p_open fails, don't set the pid.
The OpenBSD patches in this area set f_file to -1 after the fd is
closed and then avoids calling close if f_file < 0. I haven't done
this, but it might be a good idea too.
Inspired by: PR 67139/OpenBSD
2004-05-30 00:02:19 +00:00
..
2004-03-08 20:02:23 +00:00
2004-04-16 09:31:17 +00:00
2004-05-28 07:25:23 +00:00
2004-04-07 22:16:04 +00:00
2004-02-04 11:59:08 +00:00
2004-03-05 08:42:15 +00:00
2004-05-27 19:23:27 +00:00
2004-01-21 13:38:17 +00:00
2004-04-13 19:31:21 +00:00
2004-04-13 19:31:21 +00:00
2004-04-13 14:16:37 +00:00
2003-11-04 06:38:37 +00:00
2004-05-24 13:21:24 +00:00
2004-02-28 21:50:50 +00:00
2004-04-10 00:18:00 +00:00
2004-05-16 22:08:17 +00:00
2004-03-05 13:58:40 +00:00
2003-10-26 05:51:51 +00:00
2004-04-15 08:56:06 +00:00
2003-03-11 13:48:58 +00:00
2004-03-05 08:10:19 +00:00
2004-04-01 16:37:46 +00:00
2004-01-25 11:39:42 +00:00
2003-09-07 16:43:53 +00:00
2003-06-07 10:56:12 +00:00
2003-03-13 23:34:18 +00:00
2004-05-13 21:55:53 +00:00
2004-05-16 19:29:33 +00:00
2004-05-24 11:59:17 +00:00
2004-01-26 04:27:22 +00:00
2003-07-06 12:44:11 +00:00
2004-05-26 22:59:55 +00:00
2004-01-04 15:51:32 +00:00
2003-04-04 17:49:21 +00:00
2004-05-25 12:11:13 +00:00
2003-07-07 03:54:04 +00:00
2004-05-25 10:43:46 +00:00
2004-05-22 16:56:04 +00:00
2002-07-14 14:47:15 +00:00
2003-06-05 04:30:00 +00:00
2003-05-14 20:31:06 +00:00
2004-01-17 02:27:55 +00:00
2004-03-28 13:42:27 +00:00
2004-03-28 13:42:27 +00:00
2004-03-28 13:42:27 +00:00
2004-05-26 22:59:55 +00:00
2004-01-22 07:23:36 +00:00
2004-01-22 07:23:36 +00:00
2004-05-16 22:08:17 +00:00
2004-01-21 16:49:05 +00:00
2004-05-28 17:44:11 +00:00
2004-04-20 23:34:39 +00:00
2004-02-04 10:20:43 +00:00
2003-12-26 17:10:58 +00:00
2003-06-06 11:30:50 +00:00
2003-06-06 11:30:50 +00:00
2003-06-06 11:30:50 +00:00
2003-06-06 11:30:50 +00:00
2004-04-13 11:24:43 +00:00
2004-05-29 18:39:27 +00:00
2003-07-04 19:14:27 +00:00
2003-04-22 13:24:56 +00:00
2003-05-03 21:06:42 +00:00
2002-12-04 14:45:48 +00:00
2004-05-29 01:22:53 +00:00
2004-05-16 22:08:17 +00:00
2004-05-29 06:10:42 +00:00
2003-06-11 21:37:19 +00:00
2004-04-30 00:20:58 +00:00
2002-07-14 14:47:15 +00:00
2004-02-19 18:55:55 +00:00
2003-05-03 21:06:42 +00:00
2003-07-07 03:54:04 +00:00
2004-01-17 23:58:23 +00:00
2003-07-07 03:54:04 +00:00
2002-07-14 14:47:15 +00:00
2002-11-27 15:31:08 +00:00
2004-03-07 10:10:19 +00:00
2004-01-22 07:23:36 +00:00
2003-10-24 18:26:30 +00:00
2004-02-23 20:25:27 +00:00
2004-02-23 20:25:27 +00:00
2004-02-05 22:44:25 +00:00
2004-03-27 14:23:25 +00:00
2004-01-10 13:09:21 +00:00
2003-09-30 04:09:21 +00:00
2004-05-24 12:44:00 +00:00
2003-07-06 12:44:11 +00:00
2004-01-11 19:38:48 +00:00
2003-08-04 21:31:53 +00:00
2003-04-04 17:49:21 +00:00
2004-03-07 02:49:06 +00:00
2004-03-31 20:58:39 +00:00
2004-04-04 19:25:39 +00:00
2004-03-30 20:43:07 +00:00
2004-01-27 21:52:52 +00:00
2004-02-23 20:25:27 +00:00
2004-03-13 04:41:40 +00:00
2003-04-04 17:49:21 +00:00
2004-03-13 09:51:43 +00:00
2004-05-22 17:06:54 +00:00
2004-05-21 21:38:17 +00:00
2004-01-06 20:23:20 +00:00
2003-04-29 19:53:00 +00:00
2002-07-14 14:47:15 +00:00
2004-05-08 23:45:31 +00:00
2004-02-05 22:44:25 +00:00
2004-05-19 21:00:42 +00:00
2004-01-31 17:28:09 +00:00
2004-04-09 16:59:05 +00:00
2003-07-07 03:54:04 +00:00
2003-05-03 21:06:42 +00:00
2004-03-26 09:28:03 +00:00
2004-03-08 20:31:37 +00:00
2003-05-03 21:06:42 +00:00
2003-05-03 21:06:42 +00:00
2004-01-22 07:23:36 +00:00
2004-04-20 13:58:14 +00:00
2004-04-04 19:38:08 +00:00
2004-01-22 07:23:36 +00:00
2002-07-14 14:47:15 +00:00
2003-09-04 01:33:43 +00:00
2003-11-14 17:16:50 +00:00
2004-05-16 22:08:17 +00:00
2004-04-04 19:46:14 +00:00
2003-10-26 06:14:10 +00:00
2003-06-15 21:24:45 +00:00
2004-05-24 13:21:24 +00:00
2004-05-24 12:28:27 +00:00
2003-10-29 09:31:41 +00:00
2003-10-26 10:30:17 +00:00
2004-03-10 08:46:39 +00:00
2003-07-06 12:44:11 +00:00
2004-03-17 20:10:59 +00:00
2004-04-13 11:24:43 +00:00
2004-01-22 07:23:36 +00:00
2004-05-18 16:18:04 +00:00
2003-07-24 18:30:25 +00:00
2004-02-18 05:40:15 +00:00
2004-05-13 15:46:28 +00:00
2003-02-24 22:53:26 +00:00
2002-12-24 13:41:48 +00:00
2004-05-24 11:59:17 +00:00
2003-05-03 21:06:42 +00:00
2004-05-27 13:31:16 +00:00
2002-07-14 14:47:15 +00:00
2002-07-15 18:53:52 +00:00
2004-05-18 16:18:04 +00:00
2004-05-30 00:02:19 +00:00
2003-07-24 19:58:56 +00:00
2003-06-04 15:58:03 +00:00
2004-03-31 15:00:44 +00:00
2004-02-04 21:59:29 +00:00
2002-07-28 02:27:07 +00:00
2003-11-12 18:56:59 +00:00
2003-05-03 21:06:42 +00:00
2003-11-28 20:44:25 +00:00
2004-02-25 03:59:56 +00:00
2003-10-25 22:03:10 +00:00
2004-05-24 13:22:00 +00:00
2003-09-18 16:20:32 +00:00
2003-05-03 21:06:42 +00:00
2004-05-29 21:03:00 +00:00
2004-05-03 21:41:02 +00:00
2003-10-05 12:09:31 +00:00
2004-01-21 14:01:29 +00:00
2003-05-03 21:06:42 +00:00
2003-06-04 19:24:24 +00:00
2004-05-24 16:10:57 +00:00
2003-05-03 21:06:42 +00:00
2003-06-13 16:13:28 +00:00
2004-02-09 00:10:18 +00:00
2003-04-04 17:49:21 +00:00
2003-08-16 19:59:53 +00:00
2004-05-23 18:30:08 +00:00