Umm. Not guilty by reason of insanity.
authorEric Andersen <andersen@codepoet.org>
Fri, 30 Jul 2004 17:39:08 +0000 (17:39 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 30 Jul 2004 17:39:08 +0000 (17:39 -0000)
 -Erik

loginutils/getty.c
loginutils/login.c

index 2b37136fea27358a0e55491e84f5e21a5de79125..71cadc7ab9ffaf4689f42ca35ccf464382c7256f 100644 (file)
@@ -504,7 +504,7 @@ static void update_utmp(char *line)
         * entry in the utmp file.
         */
        if (access(_PATH_UTMP, R_OK|W_OK) == -1) {
-               creat(_PATH_UTMP, O_RDWR);
+               creat(_PATH_UTMP, 0664);
        }
        utmpname(_PATH_UTMP);
        setutent();
@@ -535,7 +535,7 @@ static void update_utmp(char *line)
 
        {
                if (access(_PATH_WTMP, R_OK|W_OK) == -1) {
-                       creat(_PATH_WTMP, O_RDWR);
+                       creat(_PATH_WTMP, 0664);
                }
                updwtmp(_PATH_WTMP, &ut);
        }
index 93d81d3144300ca1504ad033bf24e78dfa47d99a..f5e950f5832ef53bf7f8312c3de560c35611718a 100644 (file)
@@ -479,7 +479,7 @@ static void setutmp(const char *name, const char *line)
        pututline(&utent);
        endutent();
        if (access(_PATH_WTMP, R_OK|W_OK) == -1) {
-               creat(_PATH_WTMP, O_RDWR);
+               creat(_PATH_WTMP, 0664);
        }
        updwtmp(_PATH_WTMP, &utent);
 }