aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/libldaputils/lpasswd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libldaputils/lpasswd.c')
-rw-r--r--lib/libldaputils/lpasswd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libldaputils/lpasswd.c b/lib/libldaputils/lpasswd.c
index d88ccd4..dffe2dc 100644
--- a/lib/libldaputils/lpasswd.c
+++ b/lib/libldaputils/lpasswd.c
@@ -74,6 +74,9 @@
74#endif 74#endif
75 75
76/// getpass() replacement -- SUSV 2 deprecated getpass() 76/// getpass() replacement -- SUSV 2 deprecated getpass()
77/// @param[in] prompt prompt to display to end user
78///
79/// @return Returns string containing user entered password.
77char * ldaputils_getpass(const char * prompt) 80char * ldaputils_getpass(const char * prompt)
78{ 81{
79 static char buff[512]; 82 static char buff[512];
@@ -128,6 +131,9 @@ char * ldaputils_getpass(const char * prompt)
128 131
129 132
130/// retrieves password 133/// retrieves password
134/// @param[in] lud reference to LDAP utilities struct
135///
136/// @return Returns LDAP_SUCCESS on success or error code if fails
131int ldaputils_pass(LDAPUtils * lud) 137int ldaputils_pass(LDAPUtils * lud)
132{ 138{
133 char * str; 139 char * str;
@@ -165,6 +171,12 @@ int ldaputils_pass(LDAPUtils * lud)
165 171
166 172
167/// retrieves password from file 173/// retrieves password from file
174/// @param[in] lud reference to LDAP utilities struct
175/// @param[in] file password file
176/// @param[out] valp reference to pointer to store allocate memory
177/// @param[out] lenp reference to pointer to store size of memory
178///
179/// @return Returns LDAP_SUCCESS on success or 1 on error
168int ldaputils_passfile(LDAPUtils * lud, const char * file, char ** valp, size_t * lenp) 180int ldaputils_passfile(LDAPUtils * lud, const char * file, char ** valp, size_t * lenp)
169{ 181{
170 int fd; 182 int fd;