chiark / gitweb /
umask: set umask of a number of sockets by default, even though we check creds on...
[elogind.git] / src / cryptsetup-generator.c
index 696f44ae3670dee8868a1b97f6d8d93858560c30..a340218fda0d177bb1b2811bac3a075ca609ebe8 100644 (file)
@@ -47,7 +47,7 @@ static bool has_option(const char *haystack, const char *needle) {
                         continue;
                 }
 
-                if (f[l] != 0 && f[l] == ',') {
+                if (f[l] != 0 && f[l] != ',') {
                         f++;
                         continue;
                 }
@@ -246,6 +246,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         if (!(f = fopen("/etc/crypttab", "re"))) {
 
                 if (errno == ENOENT)