diff options
author | Gerald Carter <jerry@samba.org> | 2005-04-12 00:40:45 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-04-12 00:40:45 +0000 |
commit | f903c10943c537f462037c1f841e9923d56145dd (patch) | |
tree | d6ace8b1752566f3310c86762383c49545adb764 /examples/libsmbclient/testacl.c | |
parent | f0f7108060652a3f0d1b5ca4783cf62cd84fac12 (diff) | |
download | samba-3.0.15pre1.tar.gz samba-3.0.15pre1.tar.xz samba-3.0.15pre1.zip |
r6304: missed some files in the previous commitsamba-3.0.15pre1
Diffstat (limited to 'examples/libsmbclient/testacl.c')
-rw-r--r-- | examples/libsmbclient/testacl.c | 54 |
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[]) { |