5 #include "libsmbclient.h"
6 #include "get_auth_data_fn.h"
20 int main(int argc, const char *argv[])
24 static char *the_acl = NULL;
30 if (smbc_init(get_auth_data_fn, debug) != 0)
32 printf("Could not initialize smbc_ library\n");
36 context = smbc_set_context(NULL);
37 smbc_setOptionFullTimeNames(context, 1);
39 the_acl = strdup("system.nt_sec_desc.*");
40 ret = smbc_getxattr(argv[1], the_acl, value, sizeof(value));
43 printf("Could not get attributes for [%s] %d: %s\n",
44 argv[1], errno, strerror(errno));
48 printf("Attributes for [%s] are:\n%s\n", argv[1], value);
51 debugstr = "set attributes (1st time)";
53 ret = smbc_setxattr(argv[1], the_acl, value, strlen(value), flags);
56 printf("Could not %s for [%s] %d: %s\n",
57 debugstr, argv[1], errno, strerror(errno));
62 debugstr = "set attributes (2nd time)";
64 ret = smbc_setxattr(argv[1], the_acl, value, strlen(value), flags);
67 printf("Could not %s for [%s] %d: %s\n",
68 debugstr, argv[1], errno, strerror(errno));