diff options
author | Simo Sorce <idra@samba.org> | 2006-08-13 07:33:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:31 -0500 |
commit | faed8175063b16df94d5332581baf1af0562bb09 (patch) | |
tree | eb7c5b5fee25bf0e004f76ba40dad3785ef3ef9f /source4/dsdb/samdb/ldb_modules/kludge_acl.c | |
parent | a9ad616a6820cb98f85e2543f65a2b711e080da7 (diff) | |
download | samba-faed8175063b16df94d5332581baf1af0562bb09.tar.gz samba-faed8175063b16df94d5332581baf1af0562bb09.tar.bz2 samba-faed8175063b16df94d5332581baf1af0562bb09.zip |
r17514: Simplify the way to set ldb errors and add another
helper function to set them.
(This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/kludge_acl.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/kludge_acl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c index ecb3e00f95..088f2657cc 100644 --- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c +++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c @@ -114,7 +114,7 @@ static int kludge_acl_callback(struct ldb_context *ldb, void *context, struct ld int i; if (!context || !ares) { - ldb_set_errstring(ldb, talloc_asprintf(ldb, "NULL Context or Result in callback")); + ldb_set_errstring(ldb, "NULL Context or Result in callback"); goto error; } @@ -199,10 +199,11 @@ static int kludge_acl_change(struct ldb_module *module, struct ldb_request *req) case ADMINISTRATOR: return ldb_next_request(module, req); default: - ldb_set_errstring(module->ldb, - talloc_asprintf(req, "kludge_acl_change: " - "attempted database modify not permitted. User %s is not SYSTEM or an administrator", - user_name(req, module))); + ldb_asprintf_errstring(module->ldb, + "kludge_acl_change: " + "attempted database modify not permitted. " + "User %s is not SYSTEM or an administrator", + user_name(req, module)); return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS; } } |