summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_xattr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-03-17 14:53:06 -0700
committerJeremy Allison <jra@samba.org>2009-03-17 14:53:06 -0700
commit8dd1faaa2992851f6852ba7ea4498445af5faadd (patch)
tree9720fbd58d974d3245d9c933e448ddff220277d1 /source3/libsmb/libsmb_xattr.c
parent153a837bd61338c0b912c43458900224de0654f7 (diff)
downloadsamba-8dd1faaa2992851f6852ba7ea4498445af5faadd.tar.gz
samba-8dd1faaa2992851f6852ba7ea4498445af5faadd.tar.bz2
samba-8dd1faaa2992851f6852ba7ea4498445af5faadd.zip
Remove the global "struct cm_cred_struct" and associated calls, make
callers pass in a struct user_auth_info * instead. This commit causes smbc_set_credentials() to print out a message telling callers to use smbc_set_credentials_with_fallback() instead, as smbc_set_credentials() has a broken API (no SMBCCTX * pointer). No more global variables used in the connection manager API for client dfs calls. Jeremy.
Diffstat (limited to 'source3/libsmb/libsmb_xattr.c')
-rw-r--r--source3/libsmb/libsmb_xattr.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 70fbc27883..1ea53eb99a 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -891,7 +891,8 @@ cacl_get(SMBCCTX *context,
/* Point to the portion after "system.nt_sec_desc." */
name += 19; /* if (all) this will be invalid but unused */
- if (!cli_resolve_path(ctx, "", cli, filename,
+ if (!cli_resolve_path(ctx, "", context->internal->auth_info,
+ cli, filename,
&targetcli, &targetpath)) {
DEBUG(5, ("cacl_get Could not resolve %s\n",
filename));
@@ -1496,14 +1497,15 @@ cacl_get(SMBCCTX *context,
set the ACLs on a file given an ascii description
*******************************************************/
static int
-cacl_set(TALLOC_CTX *ctx,
- struct cli_state *cli,
- struct cli_state *ipc_cli,
- POLICY_HND *pol,
- const char *filename,
- char *the_acl,
- int mode,
- int flags)
+cacl_set(SMBCCTX *context,
+ TALLOC_CTX *ctx,
+ struct cli_state *cli,
+ struct cli_state *ipc_cli,
+ POLICY_HND *pol,
+ const char *filename,
+ char *the_acl,
+ int mode,
+ int flags)
{
int fnum;
int err = 0;
@@ -1547,8 +1549,9 @@ cacl_set(TALLOC_CTX *ctx,
return -1;
}
- if (!cli_resolve_path(ctx, "", cli, filename,
- &targetcli, &targetpath)) {
+ if (!cli_resolve_path(ctx, "", context->internal->auth_info,
+ cli, filename,
+ &targetcli, &targetpath)) {
DEBUG(5,("cacl_set: Could not resolve %s\n", filename));
errno = ENOENT;
return -1;
@@ -1793,7 +1796,7 @@ SMBC_setxattr_ctx(SMBCCTX *context,
}
if (ipc_srv) {
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
namevalue,
(*namevalue == '*'
@@ -1857,7 +1860,7 @@ SMBC_setxattr_ctx(SMBCCTX *context,
errno = ENOMEM;
ret = -1;
} else {
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
namevalue,
(*namevalue == '*'
@@ -1887,7 +1890,7 @@ SMBC_setxattr_ctx(SMBCCTX *context,
errno = ENOMEM;
ret = -1;
} else {
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
namevalue, SMBC_XATTR_MODE_CHOWN, 0);
}
@@ -1914,7 +1917,7 @@ SMBC_setxattr_ctx(SMBCCTX *context,
errno = ENOMEM;
ret = -1;
} else {
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
namevalue, SMBC_XATTR_MODE_CHGRP, 0);
}
@@ -2216,7 +2219,7 @@ SMBC_removexattr_ctx(SMBCCTX *context,
StrCaseCmp(name, "system.nt_sec_desc.*+") == 0) {
/* Yup. */
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
NULL, SMBC_XATTR_MODE_REMOVE_ALL, 0);
TALLOC_FREE(frame);
@@ -2236,7 +2239,7 @@ SMBC_removexattr_ctx(SMBCCTX *context,
StrnCaseCmp(name, "system.nt_sec_desc.acl+", 23) == 0) {
/* Yup. */
- ret = cacl_set(talloc_tos(), srv->cli,
+ ret = cacl_set(context, talloc_tos(), srv->cli,
ipc_srv->cli, &ipc_srv->pol, path,
CONST_DISCARD(char *, name) + 19,
SMBC_XATTR_MODE_REMOVE, 0);