X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Fudevd.c;h=f1a31e7afbb4c767e250cf6f0dd120bf33a28c58;hp=1220deaaa6619472fc00493d45a93d60845b11da;hb=79449642ebcb6170adb8d6391518e328a07d9552;hpb=2a30eaa452ad614c1957735fef47a7bc200db9cd diff --git a/udev/udevd.c b/udev/udevd.c index 1220deaaa..f1a31e7af 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -889,10 +889,11 @@ static void static_dev_create_from_modules(struct udev *udev) if (sscanf(devno, "%c%u:%u", &type, &maj, &min) != 3) continue; + /* set sticky bit, so we do not remove the node on module unload */ if (type == 'c') - mode = 0600 | S_IFCHR; + mode = 01600|S_IFCHR; else if (type == 'b') - mode = 0600 | S_IFBLK; + mode = 01600|S_IFBLK; else continue;