Lines Matching refs:user

45 	int	(*mbdb_lookup) __P((char *name, SM_MBDB_T *user));
50 static int mbdb_pw_lookup __P((char *name, SM_MBDB_T *user));
57 static int mbdb_ldap_lookup __P((char *name, SM_MBDB_T *user));
155 ** user -- pointer to structure to fill in on success
158 ** On success, fill in *user and return EX_OK.
159 ** If the user does not exist, return EX_NOUSER.
165 sm_mbdb_lookup(name, user)
167 SM_MBDB_T *user;
172 ret = SmMbdbType->mbdb_lookup(name, user);
180 ** user -- destination user information structure
188 sm_mbdb_frompw(user, pw)
189 SM_MBDB_T *user;
192 SM_REQUIRE(user != NULL);
193 (void) sm_strlcpy(user->mbdb_name, pw->pw_name,
194 sizeof(user->mbdb_name));
195 user->mbdb_uid = pw->pw_uid;
196 user->mbdb_gid = pw->pw_gid;
197 sm_pwfullname(pw->pw_gecos, pw->pw_name, user->mbdb_fullname,
198 sizeof(user->mbdb_fullname));
199 (void) sm_strlcpy(user->mbdb_homedir, pw->pw_dir,
200 sizeof(user->mbdb_homedir));
201 (void) sm_strlcpy(user->mbdb_shell, pw->pw_shell,
202 sizeof(user->mbdb_shell));
206 ** SM_PWFULLNAME -- build full name of user from pw_gecos field.
213 ** user -- the login name of this user (for &).
236 sm_pwfullname(gecos, user, buf, buflen)
238 char *user;
254 (void) sm_strlcpy(buf, user, buflen);
260 (void) sm_strlcpy(bp, user, buflen - (bp - buf));
304 ** user -- pointer to structure to fill in on success
307 ** On success, fill in *user and return EX_OK.
312 mbdb_pw_lookup(name, user)
314 SM_MBDB_T *user;
338 ** user unknown <-> getpwnam() == NULL && errno == 0
348 sm_mbdb_frompw(user, pw);
375 ** DESC 'An integer uniquely identifying a user in an
472 ** user -- pointer to structure to fill in on success
475 ** On success, fill in *user and return EX_OK.
486 mbdb_ldap_lookup(name, user)
488 SM_MBDB_T *user;
498 if (strlen(name) >= sizeof(user->mbdb_name))
637 strlen(vals[0]) >= sizeof(user->mbdb_fullname))
640 sm_pwfullname(vals[0], name, user->mbdb_fullname,
641 sizeof(user->mbdb_fullname));
647 strlen(vals[0]) >= sizeof(user->mbdb_homedir))
650 (void) sm_strlcpy(user->mbdb_homedir, vals[0],
651 sizeof(user->mbdb_homedir));
657 strlen(vals[0]) >= sizeof(user->mbdb_shell))
660 (void) sm_strlcpy(user->mbdb_shell, vals[0],
661 sizeof(user->mbdb_shell));
683 user->mbdb_uid = atoi(vals[0]);
705 user->mbdb_gid = atoi(vals[0]);
750 (void) sm_strlcpy(user->mbdb_name, name,
751 sizeof(user->mbdb_name));