Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137714754
D19847.id55955.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
779 B
Referenced Files
None
Subscribers
None
D19847.id55955.diff
View Options
Index: head/sbin/mount/mount.c
===================================================================
--- head/sbin/mount/mount.c
+++ head/sbin/mount/mount.c
@@ -227,6 +227,7 @@
struct pidfh *pfh;
pid_t mountdpid;
+ mountdpid = 0;
pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid);
if (pfh != NULL) {
/* Mountd is not running. */
@@ -237,6 +238,16 @@
/* Cannot open pidfile for some reason. */
return;
}
+
+ /*
+ * Refuse to send broadcast or group signals, this has
+ * happened due to the bugs in pidfile(3).
+ */
+ if (mountdpid <= 0) {
+ warnx("mountd pid %d, refusing to send SIGHUP", mountdpid);
+ return;
+ }
+
/* We have mountd(8) PID in mountdpid varible, let's signal it. */
if (kill(mountdpid, SIGHUP) == -1)
err(1, "signal mountd");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 26, 3:52 AM (3 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26196977
Default Alt Text
D19847.id55955.diff (779 B)
Attached To
Mode
D19847: Exercise some care before sending SIGHUP to mountd.
Attached
Detach File
Event Timeline
Log In to Comment