diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-10-21 17:22:03 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-15 11:00:26 +0100 |
commit | d6d8893d56d0f7b6be7e9a8c34d454f4933525d5 (patch) | |
tree | 637d50d8291817563ce31dbfc3ccdc8fd5093031 /source3/utils/regedit.c | |
parent | d134f57ccf76bf7b09272d3c58a786e7b881934f (diff) | |
download | samba-d6d8893d56d0f7b6be7e9a8c34d454f4933525d5.tar.gz |
s3:popt_common: simplify popt_common_credentials handling
This offers a global 'struct user_auth_info *cmdline_auth_info',
similar to the 'cmdline_credentials' we have in
source4/lib/cmdline/popt_common.c.
And we create that in the POPT_CALLBACK_REASON_PRE stage
and finalize it in the POPT_CALLBACK_REASON_POST stage.
That means much less boring work for the callers
and more freedom to change the user_auth_info internals
in future.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/utils/regedit.c')
-rw-r--r-- | source3/utils/regedit.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c index 88fd74c6c35..476897f4e78 100644 --- a/source3/utils/regedit.c +++ b/source3/utils/regedit.c @@ -765,7 +765,6 @@ int main(int argc, const char **argv) }; int opt; poptContext pc; - struct user_auth_info *auth_info; TALLOC_CTX *frame; struct registry_context *ctx; WERROR rv; @@ -776,11 +775,6 @@ int main(int argc, const char **argv) lp_set_cmdline("log level", "0"); /* process options */ - auth_info = user_auth_info_init(frame); - if (auth_info == NULL) { - exit(1); - } - popt_common_set_auth_info(auth_info); pc = poptGetContext("regedit", argc, argv, long_options, 0); while ((opt = poptGetNextOpt(pc)) != -1) { |