summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/passwd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r--winsup/cygwin/passwd.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index 844086447..3b6494c94 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -359,6 +359,18 @@ setpassent ()
return 0;
}
+/* Internal function. ONLY USE THIS INTERNALLY, NEVER `getpwent'!!! */
+struct passwd *
+internal_getpwent (int pos)
+{
+ if (passwd_state <= initializing)
+ read_etc_passwd ();
+
+ if (pos < curr_lines)
+ return passwd_buf + pos;
+ return NULL;
+}
+
extern "C" char *
getpass (const char * prompt)
{