summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-09-17 03:00:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:53 -0500
commit9dd6cac44a63c20e616cf15815bef61303da56c2 (patch)
tree85f93d1fc76849cb7e80bc4dbed8f7271a9d205b /source4
parentc4d45aac9da6b4fdade4e8ff3434a412af6db8fc (diff)
downloadsamba-9dd6cac44a63c20e616cf15815bef61303da56c2.tar.gz
samba-9dd6cac44a63c20e616cf15815bef61303da56c2.tar.bz2
samba-9dd6cac44a63c20e616cf15815bef61303da56c2.zip
r18591: Better defaults for share creation
Fix logic error in paged_results (This used to be commit 34ce1f8e1bab2debb508aa8bf478231389a77d42)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/modules/paged_results.c19
-rw-r--r--source4/param/share_ldb.c8
2 files changed, 18 insertions, 9 deletions
diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c
index 133ee1fb78..3ab575ef6b 100644
--- a/source4/lib/ldb/modules/paged_results.c
+++ b/source4/lib/ldb/modules/paged_results.c
@@ -44,11 +44,15 @@ struct message_store {
struct message_store *next;
};
+struct private_data;
+
struct results_store {
+
+ struct private_data *priv;
+
char *cookie;
time_t timestamp;
- int num_sent; /* To be removed */
- struct ldb_result *result; /* To be removed */
+
struct results_store *prev;
struct results_store *next;
@@ -79,7 +83,11 @@ int store_destructor(struct results_store *store)
if (store->next) {
store->next->prev = store->prev;
}
-
+
+ if (store == store->priv->store) {
+ store->priv->store = NULL;
+ }
+
return 0;
}
@@ -95,6 +103,8 @@ static struct results_store *new_store(struct private_data *priv)
newr = talloc(priv, struct results_store);
if (!newr) return NULL;
+ newr->priv = priv;
+
newr->cookie = talloc_asprintf(newr, "%d", new_id);
if (!newr->cookie) {
talloc_free(newr);
@@ -103,9 +113,6 @@ static struct results_store *new_store(struct private_data *priv)
newr->timestamp = time(NULL);
- newr->num_sent = 0; /* To be removed */
- newr->result = NULL; /* To be removed */
-
newr->first = NULL;
newr->num_entries = 0;
newr->first_ref = NULL;
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index 21f6938f69..fba204c834 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -361,6 +361,8 @@ NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_i
SHARE_ADD_STRING(SHARE_AVAILABLE, "True");
SHARE_ADD_STRING(SHARE_BROWSEABLE, "True");
SHARE_ADD_STRING(SHARE_READONLY, "False");
+ SHARE_ADD_STRING(SHARE_NTVFS_HANDLER, "unixuid");
+ SHARE_ADD_STRING(SHARE_NTVFS_HANDLER, "posix");
err = ldb_add(ldb, msg);
if (err != LDB_SUCCESS) {
@@ -428,7 +430,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
struct ldb_message *msg;
TALLOC_CTX *tmp_ctx;
NTSTATUS ret;
- bool rename = False;
+ bool do_rename = False;
char *newname;
int err, i;
@@ -462,7 +464,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
for (i = 0; i < count; i++) {
if (strcasecmp(info[i].name, SHARE_NAME) == 0) {
if (strcasecmp(name, (char *)info[i].value) != 0) {
- rename = True;
+ do_rename = True;
newname = (char *)info[i].value;
SHARE_MOD_STRING("cn", (char *)info[i].value);
}
@@ -485,7 +487,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
}
}
- if (rename) {
+ if (do_rename) {
struct ldb_dn *olddn, *newdn;
olddn = msg->dn;