-/* $OpenBSD: quot.c,v 1.31 2018/07/26 13:37:40 mestre Exp $ */
+/* $OpenBSD: quot.c,v 1.32 2018/09/18 03:09:55 millert Exp $ */
/*
* Copyright (C) 1991, 1994 Wolfgang Solfrank.
user(uid_t uid)
{
int i;
- struct passwd *pwd;
struct user *usr;
+ const char *name;
while (1) {
for (usr = users + (uid&(nusers - 1)), i = nusers;
if (!usr->name) {
usr->uid = uid;
- if (!(pwd = getpwuid(uid)))
+ if ((name = user_from_uid(uid, 1)) == NULL)
asprintf(&usr->name, "#%u", uid);
else
- usr->name = strdup(pwd->pw_name);
+ usr->name = strdup(name);
if (!usr->name)
err(1, "allocate users");
return usr;
union dinode *dp;
int n;
+ setpassent(1);
+
maxino = super->fs_ncg * super->fs_ipg - 1;
for (inode = 0; inode < maxino; inode++) {
errno = 0;