summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient/testacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/libsmbclient/testacl.c')
-rw-r--r--examples/libsmbclient/testacl.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/examples/libsmbclient/testacl.c b/examples/libsmbclient/testacl.c
index 47668f7c9c4..ce5694b331a 100644
--- a/examples/libsmbclient/testacl.c
+++ b/examples/libsmbclient/testacl.c
@@ -3,6 +3,7 @@
#include <errno.h>
#include <popt.h>
#include "libsmbclient.h"
+#include "get_auth_data_fn.h"
enum acl_mode
{
@@ -15,59 +16,6 @@ enum acl_mode
SMB_ACL_CHGRP
};
-static void
-get_auth_data_fn(const char * pServer,
- const char * pShare,
- char * pWorkgroup,
- int maxLenWorkgroup,
- char * pUsername,
- int maxLenUsername,
- char * pPassword,
- int maxLenPassword)
-
-{
- char temp[128];
-
- fprintf(stdout, "Workgroup: [%s] ", pWorkgroup);
- fgets(temp, sizeof(temp), stdin);
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pWorkgroup, temp, maxLenWorkgroup - 1);
- }
-
- fprintf(stdout, "Username: [%s] ", pUsername);
- fgets(temp, sizeof(temp), stdin);
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pUsername, temp, maxLenUsername - 1);
- }
-
- fprintf(stdout, "Password: ");
- fgets(temp, sizeof(temp), stdin);
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pPassword, temp, maxLenPassword - 1);
- }
-}
-
int main(int argc, const char *argv[])
{