summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/posix_acls.c32
-rw-r--r--source3/smbd/pysmbd.c34
-rw-r--r--source3/smbd/trans2.c16
3 files changed, 41 insertions, 41 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index deef07e900..4efcb33a13 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3075,7 +3075,7 @@ static bool set_canon_ace_list(files_struct *fsp,
fail:
if (the_acl != NULL) {
- sys_acl_free_acl(the_acl);
+ TALLOC_FREE(the_acl);
}
return ret;
@@ -3108,7 +3108,7 @@ SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl)
if (!the_acl)
return NULL;
if (sys_acl_get_entry(the_acl, SMB_ACL_FIRST_ENTRY, &entry) != 1) {
- sys_acl_free_acl(the_acl);
+ TALLOC_FREE(the_acl);
return NULL;
}
return the_acl;
@@ -3557,10 +3557,10 @@ static NTSTATUS posix_get_nt_acl_common(struct connection_struct *conn,
done:
if (posix_acl) {
- sys_acl_free_acl(posix_acl);
+ TALLOC_FREE(posix_acl);
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
free_canon_ace_list(file_ace);
free_canon_ace_list(dir_ace);
@@ -4298,7 +4298,7 @@ int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode
}
}
}
- sys_acl_free_acl(posix_acl);
+ TALLOC_FREE(posix_acl);
return result;
}
@@ -4390,7 +4390,7 @@ static int copy_access_posix_acl(connection_struct *conn, const char *from, cons
done:
- sys_acl_free_acl(posix_acl);
+ TALLOC_FREE(posix_acl);
return ret;
}
@@ -4420,7 +4420,7 @@ static bool directory_has_default_posix_acl(connection_struct *conn, const char
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
return has_acl;
}
@@ -4460,7 +4460,7 @@ int fchmod_acl(files_struct *fsp, mode_t mode)
done:
- sys_acl_free_acl(posix_acl);
+ TALLOC_FREE(posix_acl);
return ret;
}
@@ -4611,7 +4611,7 @@ static SMB_ACL_T create_posix_acl_from_wire(connection_struct *conn, uint16 num_
fail:
if (the_acl != NULL) {
- sys_acl_free_acl(the_acl);
+ TALLOC_FREE(the_acl);
}
return NULL;
}
@@ -4655,12 +4655,12 @@ bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, cons
if (SMB_VFS_SYS_ACL_SET_FILE(conn, fname, SMB_ACL_TYPE_DEFAULT, def_acl) == -1) {
DEBUG(5,("set_unix_posix_default_acl: acl_set_file failed on directory %s (%s)\n",
fname, strerror(errno) ));
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
return False;
}
DEBUG(10,("set_unix_posix_default_acl: set default acl for file %s\n", fname ));
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
return True;
}
@@ -4794,10 +4794,10 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
done:
if (file_acl) {
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
}
if (new_file_acl) {
- sys_acl_free_acl(new_file_acl);
+ TALLOC_FREE(new_file_acl);
}
return ret;
}
@@ -4826,20 +4826,20 @@ bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *
if (SMB_VFS_SYS_ACL_SET_FD(fsp, file_acl) == -1) {
DEBUG(5,("set_unix_posix_acl: acl_set_file failed on %s (%s)\n",
fname, strerror(errno) ));
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
return False;
}
} else {
if (SMB_VFS_SYS_ACL_SET_FILE(conn, fname, SMB_ACL_TYPE_ACCESS, file_acl) == -1) {
DEBUG(5,("set_unix_posix_acl: acl_set_file failed on %s (%s)\n",
fname, strerror(errno) ));
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
return False;
}
}
DEBUG(10,("set_unix_posix_acl: set acl for file %s\n", fname ));
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
return True;
}
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index 6bef8af66d..890e66e26f 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -164,82 +164,82 @@ static SMB_ACL_T make_simple_acl(uid_t uid, gid_t gid)
}
if (sys_acl_create_entry(&acl, &entry) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_tag_type(entry, SMB_ACL_USER_OBJ) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_permset(entry, &mode) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_create_entry(&acl, &entry) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_tag_type(entry, SMB_ACL_GROUP_OBJ) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_permset(entry, &mode) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_create_entry(&acl, &entry) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_tag_type(entry, SMB_ACL_OTHER) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_permset(entry, &mode0) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_create_entry(&acl, &entry) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_tag_type(entry, SMB_ACL_GROUP) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_qualifier(entry, &gid) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_permset(entry, &mode) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_create_entry(&acl, &entry) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_tag_type(entry, SMB_ACL_MASK) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
if (sys_acl_set_permset(entry, &mode0) != 0) {
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
return NULL;
}
return acl;
@@ -264,7 +264,7 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self, PyObject *args)
frame = talloc_stackframe();
status = set_sys_acl_no_snum(fname, SMB_ACL_TYPE_ACCESS, acl);
- sys_acl_free_acl(acl);
+ TALLOC_FREE(acl);
TALLOC_FREE(frame);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index a178ec5b08..679e3fa828 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4914,10 +4914,10 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
(unsigned int)((num_file_acls + num_def_acls)*SMB_POSIX_ACL_ENTRY_SIZE +
SMB_POSIX_ACL_HEADER_SIZE) ));
if (file_acl) {
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
return NT_STATUS_BUFFER_TOO_SMALL;
}
@@ -4927,28 +4927,28 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
SSVAL(pdata,4,num_def_acls);
if (!marshall_posix_acl(conn, pdata + SMB_POSIX_ACL_HEADER_SIZE, psbuf, file_acl)) {
if (file_acl) {
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
return NT_STATUS_INTERNAL_ERROR;
}
if (!marshall_posix_acl(conn, pdata + SMB_POSIX_ACL_HEADER_SIZE + (num_file_acls*SMB_POSIX_ACL_ENTRY_SIZE), psbuf, def_acl)) {
if (file_acl) {
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
return NT_STATUS_INTERNAL_ERROR;
}
if (file_acl) {
- sys_acl_free_acl(file_acl);
+ TALLOC_FREE(file_acl);
}
if (def_acl) {
- sys_acl_free_acl(def_acl);
+ TALLOC_FREE(def_acl);
}
data_size = (num_file_acls + num_def_acls)*SMB_POSIX_ACL_ENTRY_SIZE + SMB_POSIX_ACL_HEADER_SIZE;
break;