dhclient: change the pidfile's permissions to 644

This change permits non-root users to determine if dhclient is running
('service dhclient status wlan0').

Discussed with: mjg, cperciva
This commit is contained in:
Eitan Adler 2014-02-03 04:22:29 +00:00
parent bcbcc48fbf
commit 07561ab459

View File

@ -393,7 +393,7 @@ main(int argc, char *argv[])
if (path_dhclient_pidfile == NULL)
error("asprintf");
}
pidfile = pidfile_open(path_dhclient_pidfile, 0600, &otherpid);
pidfile = pidfile_open(path_dhclient_pidfile, 0644, &otherpid);
if (pidfile == NULL) {
if (errno == EEXIST)
error("dhclient already running, pid: %d.", otherpid);