diff options
author | Simo Sorce <idra@samba.org> | 2003-10-13 21:26:10 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-10-13 21:26:10 +0000 |
commit | 5733f731a911478492315af288c1a674ec038452 (patch) | |
tree | b42248f3a4780ae663ee37d465cb5e9fa89bb224 /source3/lib | |
parent | 0bb70fe0b43fa9e9615e405b12c2adbb4ff04594 (diff) | |
download | samba-5733f731a911478492315af288c1a674ec038452.tar.gz samba-5733f731a911478492315af288c1a674ec038452.tar.bz2 samba-5733f731a911478492315af288c1a674ec038452.zip |
So here it is a non-intrusive patch with my latest work on gums (the
laternative to the current passdb).
Currently it is run through a comatibility module in the passdb layer, with
a subset of the functionality it may provide.
It is still work in progress, but as someone asked me about it, and as it
should make no difference to the normal code, I tought it was a good idea to
put it into.
It adds a dependency on perl. I know it is not very nice, but I'm sure we
will work out a solution for that.
As always blame me if I break something, but try to fix yourself, as I am
busy-busy-busy :-)
Simo.
(This used to be commit 7b3c94b5cfc1a9ceb430613353a937345f2eda74)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/genparser.c | 5 | ||||
-rw-r--r-- | source3/lib/genparser_samba.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/source3/lib/genparser.c b/source3/lib/genparser.c index 233050b432..7476b5d0af 100644 --- a/source3/lib/genparser.c +++ b/source3/lib/genparser.c @@ -256,7 +256,6 @@ static int gen_dump_array(TALLOC_CTX *mem_ctx, addstr(mem_ctx, p, "}\n")) { return -1; } - free(s); return 0; } @@ -673,7 +672,7 @@ int gen_parse(TALLOC_CTX *mem_ctx, const struct parse_struct *pinfo, char *data, { char *str, *s0; - s0 = strdup(s); + s0 = talloc_strdup(mem_ctx, s); str = s0; while (*str) { @@ -706,12 +705,10 @@ int gen_parse(TALLOC_CTX *mem_ctx, const struct parse_struct *pinfo, char *data, *str++ = 0; if (gen_parse_one(mem_ctx, pinfo, name, data, value) != 0) { - free(s0); return -1; } } - free(s0); return 0; } diff --git a/source3/lib/genparser_samba.c b/source3/lib/genparser_samba.c index bece587747..7eabf5a56e 100644 --- a/source3/lib/genparser_samba.c +++ b/source3/lib/genparser_samba.c @@ -118,7 +118,16 @@ int gen_parse_LUID(TALLOC_CTX *mem_ctx, char *ptr, const char *str) return 0; } +int gen_parse_DATA_BLOB(TALLOC_CTX *mem_ctx, char *ptr, const char *str) +{ + return gen_parse_struct(mem_ctx, pinfo_data_blob_info, ptr, str); +} +int gen_parse_TALLOC_CTX(TALLOC_CTX *mem_ctx, char *ptr, const char *str) +{ + (TALLOC_CTX *)ptr = NULL; + return 0; +} /* DUMP functions */ @@ -198,3 +207,12 @@ int gen_dump_LUID(TALLOC_CTX *mem_ctx, struct parse_string *p, const char *ptr, return addshort(mem_ctx, p, "%u,%u", high, low); } +int gen_dump_DATA_BLOB(TALLOC_CTX *mem_ctx, struct parse_string *p, const char *ptr, unsigned indent) +{ + return gen_dump_struct(mem_ctx, pinfo_data_blob_info, p, ptr, indent); +} + +int gen_dump_TALLOC_CTX(TALLOC_CTX *mem_ctx, struct parse_string *p, const char *ptr, unsigned indent) +{ + return addshort(mem_ctx, p, "TALLOC_CTX"); +} |