SMB_ACL_T theacl, connection_struct *conn)
{
int ret;
+ struct smb_filename *smb_fname = NULL;
mode_t saved_umask;
TALLOC_CTX *frame = talloc_stackframe();
so set our umask to 0 */
saved_umask = umask(0);
- ret = SMB_VFS_SYS_ACL_SET_FILE( conn, fname, acltype, theacl);
+ smb_fname = synthetic_smb_fname_split(frame,
+ fname,
+ lp_posix_pathnames());
+ if (smb_fname == NULL) {
+ TALLOC_FREE(frame);
+ umask(saved_umask);
+ return -1;
+ }
+
+ ret = SMB_VFS_SYS_ACL_SET_FILE( conn, smb_fname, acltype, theacl);
umask(saved_umask);
so set our umask to 0 */
saved_umask = umask(0);
- smb_fname = synthetic_smb_fname_split(fsp, fname, NULL);
+ smb_fname = synthetic_smb_fname_split(fsp,
+ fname,
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(frame);
umask(saved_umask);
struct security_descriptor **sd)
{
TALLOC_CTX *frame = talloc_stackframe();
- NTSTATUS status = SMB_VFS_GET_NT_ACL( conn, fname, security_info_wanted,
- mem_ctx, sd);
+ NTSTATUS status;
+ struct smb_filename *smb_fname = synthetic_smb_fname(talloc_tos(),
+ fname,
+ NULL,
+ NULL,
+ lp_posix_pathnames() ?
+ SMB_FILENAME_POSIX_PATH : 0);
+
+ if (smb_fname == NULL) {
+ TALLOC_FREE(frame);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = SMB_VFS_GET_NT_ACL(conn,
+ smb_fname,
+ security_info_wanted,
+ mem_ctx,
+ sd);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("get_nt_acl_conn: get_nt_acl returned %s.\n", nt_errstr(status)));
}
int uid, gid;
TALLOC_CTX *frame;
mode_t saved_umask;
+ struct smb_filename *smb_fname = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sii|z",
discard_const_p(char *, kwnames),
so set our umask to 0 */
saved_umask = umask(0);
- ret = SMB_VFS_CHOWN( conn, fname, uid, gid);
+ smb_fname = synthetic_smb_fname(talloc_tos(),
+ fname,
+ NULL,
+ NULL,
+ lp_posix_pathnames() ?
+ SMB_FILENAME_POSIX_PATH : 0);
+ if (smb_fname == NULL) {
+ umask(saved_umask);
+ TALLOC_FREE(frame);
+ errno = ENOMEM;
+ return PyErr_SetFromErrno(PyExc_OSError);
+ }
+
+ ret = SMB_VFS_CHOWN(conn, smb_fname, uid, gid);
if (ret != 0) {
umask(saved_umask);
TALLOC_FREE(frame);
return NULL;
}
- smb_fname = synthetic_smb_fname_split(frame, fname, NULL);
+ smb_fname = synthetic_smb_fname_split(frame,
+ fname,
+ lp_posix_pathnames());
if (smb_fname == NULL) {
TALLOC_FREE(frame);
return PyErr_NoMemory();
TALLOC_CTX *tmp_ctx = talloc_new(NULL);
connection_struct *conn;
char *service = NULL;
+ struct smb_filename *smb_fname = NULL;
+
if (!tmp_ctx) {
PyErr_NoMemory();
return NULL;
return NULL;
}
- acl = SMB_VFS_SYS_ACL_GET_FILE( conn, fname, acl_type, tmp_ctx);
+ smb_fname = synthetic_smb_fname_split(frame,
+ fname,
+ lp_posix_pathnames());
+ if (smb_fname == NULL) {
+ TALLOC_FREE(frame);
+ TALLOC_FREE(tmp_ctx);
+ return NULL;
+ }
+ acl = SMB_VFS_SYS_ACL_GET_FILE( conn, smb_fname, acl_type, tmp_ctx);
if (!acl) {
TALLOC_FREE(frame);
TALLOC_FREE(tmp_ctx);