svn commit: samba r18591 - in branches/SAMBA_4_0/source:
lib/ldb/modules param
idra at samba.org
idra at samba.org
Sun Sep 17 03:00:06 GMT 2006
Author: idra
Date: 2006-09-17 03:00:05 +0000 (Sun, 17 Sep 2006)
New Revision: 18591
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18591
Log:
Better defaults for share creation
Fix logic error in paged_results
Modified:
branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c
branches/SAMBA_4_0/source/param/share_ldb.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c 2006-09-17 00:15:13 UTC (rev 18590)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/paged_results.c 2006-09-17 03:00:05 UTC (rev 18591)
@@ -44,11 +44,15 @@
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 @@
if (store->next) {
store->next->prev = store->prev;
}
-
+
+ if (store == store->priv->store) {
+ store->priv->store = NULL;
+ }
+
return 0;
}
@@ -95,6 +103,8 @@
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 @@
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;
Modified: branches/SAMBA_4_0/source/param/share_ldb.c
===================================================================
--- branches/SAMBA_4_0/source/param/share_ldb.c 2006-09-17 00:15:13 UTC (rev 18590)
+++ branches/SAMBA_4_0/source/param/share_ldb.c 2006-09-17 03:00:05 UTC (rev 18591)
@@ -361,6 +361,8 @@
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 @@
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 @@
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 @@
}
}
- if (rename) {
+ if (do_rename) {
struct ldb_dn *olddn, *newdn;
olddn = msg->dn;
More information about the samba-cvs
mailing list