From: deraadt Date: Sun, 24 Oct 2021 14:40:30 +0000 (+0000) Subject: use O_RDONLY instead of 0 as open() flags parameter X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=68f2f5683fb23ee400e12936135ae21c5745f258;p=openbsd use O_RDONLY instead of 0 as open() flags parameter --- diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c index d3b91f1955c..862f33b2065 100644 --- a/lib/libc/gen/login_cap.c +++ b/lib/libc/gen/login_cap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_cap.c,v 1.39 2021/06/03 13:19:45 deraadt Exp $ */ +/* $OpenBSD: login_cap.c,v 1.40 2021/10/24 14:40:30 deraadt Exp $ */ /* * Copyright (c) 2000-2004 Todd C. Miller @@ -106,7 +106,7 @@ login_getclass(char *class) lc->lc_class); break; case -1: - if ((res = open(classfiles[0], 0)) >= 0) + if ((res = open(classfiles[0], O_RDONLY)) >= 0) close(res); if (strcmp(lc->lc_class, LOGIN_DEFCLASS) == 0 && res < 0)