- * Revision 1.4 1997/08/20 16:24:58 mdw
+ * Revision 1.5 1997/09/17 10:24:08 mdw
+ * Use `uid_t' instead of `int' for uids and gids. Not quite sure why I
+ * didn't do this before.
+ *
+ * Revision 1.4 1997/08/20 16:24:58 mdw
*
* Arguments: @userdb__map *m@ = pointer to the map block
* @const char *name@ = pointer to the item's name
*
* Arguments: @userdb__map *m@ = pointer to the map block
* @const char *name@ = pointer to the item's name
*
* Returns: A pointer to the appropriate block, or zero if not found.
*
* Use: Looks up an ID in a mapping, and returns the result.
*/
*
* Returns: A pointer to the appropriate block, or zero if not found.
*
* Use: Looks up an ID in a mapping, and returns the result.
*/
{
userdb__sym *s = sym_find(&m->idmap, (char *)&id, sizeof(id), 0, 0);
return (s ? s->rec : 0);
{
userdb__sym *s = sym_find(&m->idmap, (char *)&id, sizeof(id), 0, 0);
return (s ? s->rec : 0);
s = strtok(s, ":"); if (!s) goto tidy_0; pw->pw_name = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_1; pw->pw_passwd = xstrdup(s);
s = strtok(s, ":"); if (!s) goto tidy_0; pw->pw_name = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_1; pw->pw_passwd = xstrdup(s);
- s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_uid = atoi(s);
- s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_gid = atoi(s);
+ s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_uid = (uid_t)atol(s);
+ s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_gid = (gid_t)atol(s);
s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_gecos = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_3; pw->pw_dir = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_4; pw->pw_shell = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_2; pw->pw_gecos = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_3; pw->pw_dir = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_4; pw->pw_shell = xstrdup(s);
s = strtok(s, ":"); if (!s) goto tidy_0; gr->gr_name = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_1; gr->gr_passwd = xstrdup(s);
s = strtok(s, ":"); if (!s) goto tidy_0; gr->gr_name = xstrdup(s);
s = strtok(0, ":"); if (!s) goto tidy_1; gr->gr_passwd = xstrdup(s);