Fix user and group name to number conversion for uid/gid above 2^31.
This commit is contained in:
parent
992217d1c0
commit
3c079c821a
4
pgrep.c
4
pgrep.c
@ -296,7 +296,7 @@ static int conv_uid (const char *restrict name, struct el *restrict e)
|
|||||||
xwarnx(_("invalid user name: %s"), name);
|
xwarnx(_("invalid user name: %s"), name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e->num = pwd->pw_uid;
|
e->num = (int) pwd->pw_uid;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ static int conv_gid (const char *restrict name, struct el *restrict e)
|
|||||||
xwarnx(_("invalid group name: %s"), name);
|
xwarnx(_("invalid group name: %s"), name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
e->num = grp->gr_gid;
|
e->num = (int) grp->gr_gid;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user