summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient/teststat.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-03-31 05:06:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:24 -0500
commit9840db418bad5a39edc4a32a1786f5e2d2c9dff8 (patch)
tree4116543c742e1563ae869e1053583dbabf4195b5 /examples/libsmbclient/teststat.c
parentb76112f2116c3c08c7656387a4a49ea64915f470 (diff)
downloadsamba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.gz
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.xz
samba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.zip
r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
Diffstat (limited to 'examples/libsmbclient/teststat.c')
-rw-r--r--examples/libsmbclient/teststat.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/examples/libsmbclient/teststat.c b/examples/libsmbclient/teststat.c
index 46eeb13985a..bea34cfc098 100644
--- a/examples/libsmbclient/teststat.c
+++ b/examples/libsmbclient/teststat.c
@@ -3,65 +3,7 @@
#include <string.h>
#include <time.h>
#include <libsmbclient.h>
-
-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];
-
- printf("Entered get_auth_data_fn\n");
-
- fprintf(stdout, "Need password for //%s/%s\n", pServer, pShare);
-
- 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);
- }
-
- strcpy(temp, getpass("Password: "));
-
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
- {
- temp[strlen(temp) - 1] = '\0';
- }
-
- if (temp[0] != '\0')
- {
- strncpy(pPassword, temp, maxLenPassword - 1);
- }
-
- fprintf(stdout, "Workgroup: ");
- 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);
- }
-
- putchar('\n');
-}
-
+#include "get_auth_data_fn.h"
int main(int argc, char * argv[])