summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-05 17:33:24 +0200
committerKay Sievers <kay@vrfy.org>2012-07-05 17:33:24 +0200
commit47ef94ac5f39db6c5c18be10afe32397a0a8d5cc (patch)
tree2a6872d28ae5d6c7f4b7a73a9765dccace762e03 /src/udev/udevd.c
parentdaa9cf546ce7265645ced9592dd54c6b2fc04302 (diff)
udev: add some O_CLOEXEC
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 393e2a920c..176e4e2930 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -807,7 +807,7 @@ static void static_dev_create_from_modules(struct udev *udev)
uname(&kernel);
util_strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL);
- f = fopen(modules, "r");
+ f = fopen(modules, "re");
if (f == NULL)
return;
@@ -871,7 +871,7 @@ static int mem_size_mb(void)
char buf[4096];
long int memsize = -1;
- f = fopen("/proc/meminfo", "r");
+ f = fopen("/proc/meminfo", "re");
if (f == NULL)
return -1;
@@ -907,7 +907,7 @@ static int convert_db(struct udev *udev)
if (access(filename, F_OK) < 0)
return 0;
- f = fopen("/dev/kmsg", "w");
+ f = fopen("/dev/kmsg", "we");
if (f != NULL) {
fprintf(f, "<30>systemd-udevd[%u]: converting old udev database\n", getpid());
fclose(f);
@@ -1264,7 +1264,7 @@ int main(int argc, char *argv[])
sd_notify(1, "READY=1");
}
- f = fopen("/dev/kmsg", "w");
+ f = fopen("/dev/kmsg", "we");
if (f != NULL) {
fprintf(f, "<30>systemd-udevd[%u]: starting version " VERSION "\n", getpid());
fclose(f);