Lines Matching defs:pw

122  * int irp_marshall_pw(const struct passwd *pw, char **buffer, size_t *len)
135 irp_marshall_pw(const struct passwd *pw, char **buffer, size_t *len) {
144 if (pw == NULL || len == NULL) {
149 sprintf(pwUid, "%ld", (long)pw->pw_uid);
150 sprintf(pwGid, "%ld", (long)pw->pw_gid);
153 sprintf(pwChange, "%ld", (long)pw->pw_change);
160 sprintf(pwExpire, "%ld", (long)pw->pw_expire);
167 pwClass = pw->pw_class;
172 need += strlen(pw->pw_name) + 1; /*%< one for fieldsep */
173 need += strlen(pw->pw_passwd) + 1;
179 need += strlen(pw->pw_gecos) + 1;
180 need += strlen(pw->pw_dir) + 1;
181 need += strlen(pw->pw_shell) + 1;
204 strcpy(*buffer, pw->pw_name); strcat(*buffer, fieldsep);
205 strcat(*buffer, pw->pw_passwd); strcat(*buffer, fieldsep);
211 strcat(*buffer, pw->pw_gecos); strcat(*buffer, fieldsep);
212 strcat(*buffer, pw->pw_dir); strcat(*buffer, fieldsep);
213 strcat(*buffer, pw->pw_shell); strcat(*buffer, fieldsep);
219 * int irp_unmarshall_pw(struct passwd *pw, char *buffer)
232 irp_unmarshall_pw(struct passwd *pw, char *buffer) {
361 pw->pw_name = name;
362 pw->pw_passwd = pass;
363 pw->pw_uid = pwuid;
364 pw->pw_gid = pwgid;
365 pw->pw_gecos = gecos;
366 pw->pw_dir = dir;
367 pw->pw_shell = shell;
370 pw->pw_change = pwchange;
373 pw->pw_class = class;
376 pw->pw_expire = pwexpire;
2246 struct passwd *pw;
2250 pw = &pw1;
2251 memset(pw, 0xef, sizeof (*pw));
2252 if (irp_unmarshall_pw(pw, argv[1]) != 0) {
2258 pw->pw_name, pw->pw_passwd, (long)pw->pw_uid,
2259 (long)pw->pw_gid);
2261 pw->pw_class, (long)pw->pw_change, pw->pw_gecos);
2263 pw->pw_shell, pw->pw_dir);
2265 pw = getpwnam(pw->pw_name);
2266 irp_marshall_pw(pw, &b, &len);
2274 if ((pw = getpwnam(argv[1])) == NULL) {
2279 if (irp_marshall_pw(pw, &b, &len) != 0) {