summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/id/id.c3
-rw-r--r--usr.sbin/jail/jail.c3
-rw-r--r--usr.sbin/mountd/mountd.c5
3 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index f8fba74..085ef7c 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -274,7 +274,8 @@ user(struct passwd *pw)
{
struct group *gr;
const char *fmt;
- int cnt, gid, lastgid, ngroups, groups[NGROUPS + 1];
+ gid_t gid, lastgid, groups[NGROUPS + 1];
+ int cnt, ngroups;
(void)printf("uid=%u(%s)", pw->pw_uid, pw->pw_name);
gid = pw->pw_gid;
diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c
index 0f379a7..e467eb2 100644
--- a/usr.sbin/jail/jail.c
+++ b/usr.sbin/jail/jail.c
@@ -53,7 +53,8 @@ main(int argc, char **argv)
struct jail j;
struct passwd *pwd;
struct in_addr in;
- int ch, groups[NGROUPS], i, iflag, lflag, ngroups, uflag, Uflag;
+ gid_t groups[NGROUPS];
+ int ch, i, iflag, lflag, ngroups, uflag, Uflag;
char path[PATH_MAX], *username;
static char *cleanenv;
const char *shell, *p;
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 242a30e..f937466 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -2144,7 +2144,8 @@ parsecred(namelist, cr)
char *names;
struct passwd *pw;
struct group *gr;
- int ngroups, groups[NGROUPS + 1];
+ gid_t groups[NGROUPS + 1];
+ int ngroups;
cr->cr_version = XUCRED_VERSION;
/*
@@ -2175,7 +2176,7 @@ parsecred(namelist, cr)
if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups))
syslog(LOG_ERR, "too many groups");
/*
- * Convert from int's to gid_t's and compress out duplicate
+ * Compress out duplicate.
*/
cr->cr_ngroups = ngroups - 1;
cr->cr_groups[0] = groups[0];
OpenPOWER on IntegriCloud