aboutsummaryrefslogtreecommitdiffstats
path: root/guts/getpw.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/getpw.c')
-rw-r--r--guts/getpw.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/guts/getpw.c b/guts/getpw.c
deleted file mode 100644
index 62b44da..0000000
--- a/guts/getpw.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2010 Wind River Systems; see
- * guts/COPYRIGHT for information.
- *
- * static int
- * wrap_getpw(uid_t uid, char *buf) {
- * int rc = -1;
- */
- static struct passwd pwd;
- static char pwbuf[PSEUDO_PWD_MAX];
- struct passwd *pwp;
-
- pseudo_diag("warning: unsafe getpw() called. hoping buf has at least %d chars.\n",
- PSEUDO_PWD_MAX);
- rc = wrap_getpwuid_r(uid, &pwd, pwbuf, PSEUDO_PWD_MAX, &pwp);
- /* different error return conventions */
- if (rc != 0) {
- errno = rc;
- rc = -1;
- } else {
- snprintf(buf, PSEUDO_PWD_MAX, "%s:%s:%d:%d:%s:%s:%s",
- pwd.pw_name,
- pwd.pw_passwd,
- pwd.pw_uid,
- pwd.pw_gid,
- pwd.pw_gecos,
- pwd.pw_dir,
- pwd.pw_shell);
- }
-
-/* return rc;
- * }
- */