summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/tdb/common/open.c5
-rw-r--r--source3/libnet/libnet_join.c3
-rw-r--r--source3/libsmb/clirap.c1
-rw-r--r--source3/passdb/pdb_ldap.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/source3/lib/tdb/common/open.c b/source3/lib/tdb/common/open.c
index 0bd1c91a5e..6efa482ac2 100644
--- a/source3/lib/tdb/common/open.c
+++ b/source3/lib/tdb/common/open.c
@@ -178,9 +178,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
tdb->page_size = 0x2000;
}
- if (open_flags & TDB_VOLATILE) {
- tdb->max_dead_records = 5;
- }
+ tdb->max_dead_records = (open_flags & TDB_VOLATILE) ? 5 : 0;
if ((open_flags & O_ACCMODE) == O_WRONLY) {
TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
@@ -283,7 +281,6 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
tdb->map_size = st.st_size;
tdb->device = st.st_dev;
tdb->inode = st.st_ino;
- tdb->max_dead_records = 0;
tdb_mmap(tdb);
if (locked) {
if (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0, 1) == -1) {
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 1bb2a82959..8e6d91b38b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1072,9 +1072,12 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
return WERR_GENERAL_FAILURE;
}
+#ifdef HAVE_KRB5
if (!libnet_join_derive_salting_principal(mem_ctx, r)) {
return WERR_GENERAL_FAILURE;
}
+#endif /* HAVE_KRB5 */
+
#endif /* HAVE_LDAP */
if (!libnet_join_create_keytab(mem_ctx, r)) {
libnet_join_set_error_string(mem_ctx, r,
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 54504f608d..aab77a3d54 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -297,6 +297,7 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
STR_TERMINATE|STR_UPPER);
if (len == (size_t)-1) {
+ SAFE_FREE(last_entry);
return false;
}
p += len;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 28df56bdb1..90a6ff011b 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1973,7 +1973,7 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods,
/* rename the posix user */
rename_script = SMB_STRDUP(lp_renameuser_script());
- if (rename_script) {
+ if (rename_script == NULL) {
return NT_STATUS_NO_MEMORY;
}