diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-30 13:58:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:35:02 -0500 |
commit | a3a7881d39d0c294d0cd2ce13203478fb889b07c (patch) | |
tree | 4f2a78f93e9a369cd6658f2f6ef180b8f27ebe70 /source4/lib/samba3/share_info.c | |
parent | f3c121eb748b37a8b60d353d371bed9b79d0e37c (diff) | |
download | samba-a3a7881d39d0c294d0cd2ce13203478fb889b07c.tar.gz samba-a3a7881d39d0c294d0cd2ce13203478fb889b07c.tar.bz2 samba-a3a7881d39d0c294d0cd2ce13203478fb889b07c.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.
(This used to be commit 414e5f7f6dc38a8fde3b61d524a664f56f9ea592)
Diffstat (limited to 'source4/lib/samba3/share_info.c')
-rw-r--r-- | source4/lib/samba3/share_info.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/samba3/share_info.c b/source4/lib/samba3/share_info.c index 3479a7063c..e96adfc175 100644 --- a/source4/lib/samba3/share_info.c +++ b/source4/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; |