summaryrefslogtreecommitdiffstats
path: root/source/lib/samba3/share_info.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-30 13:58:48 +0000
committerJelmer Vernooij <jelmer@samba.org>2005-08-30 13:58:48 +0000
commit28ac76024f97edc222898ab8b475820aaa209b45 (patch)
treef22c08c20976f235fa54d3060b45a57587536ac1 /source/lib/samba3/share_info.c
parentc8e496d2c9508820bb88d80be2a5cb3de13616ab (diff)
downloadsamba-28ac76024f97edc222898ab8b475820aaa209b45.tar.gz
samba-28ac76024f97edc222898ab8b475820aaa209b45.tar.xz
samba-28ac76024f97edc222898ab8b475820aaa209b45.zip
r9798: Add generic functions for handling smb.conf files (the parameters don't to be pre-declared). Also doesn't use any globals, so multiple files can be loaded at once.
Currently uses the prefix "param" for all functions and structures; suggestions for better ones are welcome... Remove old smb.conf-parsing code from libsamba3.
Diffstat (limited to 'source/lib/samba3/share_info.c')
-rw-r--r--source/lib/samba3/share_info.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/lib/samba3/share_info.c b/source/lib/samba3/share_info.c
index 3479a7063c5..e96adfc175e 100644
--- a/source/lib/samba3/share_info.c
+++ b/source/lib/samba3/share_info.c
@@ -66,7 +66,11 @@ NTSTATUS samba3_read_share_info(const char *fn, TALLOC_CTX *ctx, struct samba3 *
name = talloc_strndup(ctx, kbuf.dptr+strlen("SECDESC/"), kbuf.dsize-strlen("SECDESC/"));
- share = samba3_find_add_share(db, ctx, name);
+ db->shares = talloc_realloc(db, db->shares, struct samba3_share_info, db->share_count+1);
+ share = &db->shares[db->share_count];
+ db->share_count++;
+
+ share->name = talloc_strdup(db, name);
vbuf = tdb_fetch(tdb, kbuf);
blob.data = (uint8_t *)vbuf.dptr;