aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-10-28 22:54:16 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-10-28 22:54:16 +0000
commit0cd94613532576fe1bd2915c9b5d26dc83d84dae (patch)
treea2001d1c5c68c26fc4d5abf39efc5008de18bb25
parent0e9fe2127cd2c3c2d4c1247d8bb738c7b8bfa980 (diff)
Notes
-rw-r--r--usr.bin/login/login_fbtab.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c
index c3ca5ecdecf0..a40d83f09f70 100644
--- a/usr.bin/login/login_fbtab.c
+++ b/usr.bin/login/login_fbtab.c
@@ -122,27 +122,27 @@ gid_t gid;
void
login_protect(table, pattern, mask, uid, gid)
- char *table;
- char *pattern;
- int mask;
- uid_t uid;
- gid_t gid;
+char *table;
+char *pattern;
+int mask;
+uid_t uid;
+gid_t gid;
{
- glob_t gl;
- char *path;
- int i;
+ glob_t gl;
+ char *path;
+ int i;
- if (glob(pattern, GLOB_NOSORT, NULL, &gl) != 0)
- return;
- for (i = 0; i < gl.gl_pathc; i++) {
- path = gl.gl_pathv[i];
- /* clear flags of the device */
- if (chflags(path, 0) && errno != ENOENT && errno != EOPNOTSUPP)
- syslog(LOG_ERR, "%s: chflags(%s): %m", table, path);
- if (chmod(path, mask) && errno != ENOENT)
- syslog(LOG_ERR, "%s: chmod(%s): %m", table, path);
- if (chown(path, uid, gid) && errno != ENOENT)
- syslog(LOG_ERR, "%s: chown(%s): %m", table, path);
- }
- globfree(&gl);
+ if (glob(pattern, GLOB_NOSORT, NULL, &gl) != 0)
+ return;
+ for (i = 0; i < gl.gl_pathc; i++) {
+ path = gl.gl_pathv[i];
+ /* clear flags of the device */
+ if (chflags(path, 0) && errno != ENOENT && errno != EOPNOTSUPP)
+ syslog(LOG_ERR, "%s: chflags(%s): %m", table, path);
+ if (chmod(path, mask) && errno != ENOENT)
+ syslog(LOG_ERR, "%s: chmod(%s): %m", table, path);
+ if (chown(path, uid, gid) && errno != ENOENT)
+ syslog(LOG_ERR, "%s: chown(%s): %m", table, path);
+ }
+ globfree(&gl);
}