diff options
author | Tim Prouty <tprouty@samba.org> | 2009-06-25 14:16:46 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-06-25 18:25:47 -0700 |
commit | 358ccc3282681b3df0ba76fecc114ad4376c8ff1 (patch) | |
tree | 106d8e8d501d42c0bdd67719288c95518dcb2939 /source3/smbd/trans2.c | |
parent | 9c48f5bf2dcc12e6eb6170ab3a2af5ca119cf008 (diff) | |
download | samba-358ccc3282681b3df0ba76fecc114ad4376c8ff1.tar.gz samba-358ccc3282681b3df0ba76fecc114ad4376c8ff1.tar.xz samba-358ccc3282681b3df0ba76fecc114ad4376c8ff1.zip |
s3: Change set_ea() and its callers to use smb_filename
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a7d5c427d3..8bd37633d0 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -404,12 +404,22 @@ static void canonicalize_ea_name(connection_struct *conn, files_struct *fsp, con Set or delete an extended attribute. ****************************************************************************/ -NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, struct ea_list *ea_list) +NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, + const struct smb_filename *smb_fname, struct ea_list *ea_list) { + char *fname = NULL; + NTSTATUS status; + if (!lp_ea_support(SNUM(conn))) { return NT_STATUS_EAS_NOT_SUPPORTED; } + status = get_full_smb_filename(talloc_tos(), smb_fname, + &fname); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + for (;ea_list; ea_list = ea_list->next) { int ret; fstring unix_ea_name; @@ -5146,7 +5156,7 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn, const char *pdata, int total_data, files_struct *fsp, - const char *fname) + const struct smb_filename *smb_fname) { struct ea_list *ea_list = NULL; TALLOC_CTX *ctx = NULL; @@ -5176,7 +5186,7 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn, if (!ea_list) { return NT_STATUS_INVALID_PARAMETER; } - status = set_ea(conn, fsp, fname, ea_list); + status = set_ea(conn, fsp, smb_fname, ea_list); return status; } @@ -6964,7 +6974,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn, pdata, total_data, fsp, - fname); + smb_fname); break; } @@ -7300,7 +7310,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, /* Try and set any given EA. */ if (ea_list) { - status = set_ea(conn, NULL, smb_dname->base_name, ea_list); + status = set_ea(conn, NULL, smb_dname, ea_list); if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); goto out; |