diff options
author | Andreas Schneider <asn@samba.org> | 2011-04-11 13:23:26 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-05-10 19:13:21 +0200 |
commit | ddc28a683fcf036a279a0d3d7b23504364316fa6 (patch) | |
tree | 9b7f70351c2a22c1102092b54291e089ce725c28 /source3/libnet | |
parent | fbd7626656d8d76f371e431005fbfa1228ba2029 (diff) | |
download | samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.gz samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.tar.bz2 samba-ddc28a683fcf036a279a0d3d7b23504364316fa6.zip |
libsmbconf: Convert smbconf_set_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 5f7f93e087..ef0d5d0850 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -1467,30 +1467,49 @@ static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r) if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE)) { - werr = smbconf_set_global_parameter(ctx, "security", "user"); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "security", "user"); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } - werr = smbconf_set_global_parameter(ctx, "workgroup", - r->in.domain_name); + err = smbconf_set_global_parameter(ctx, "workgroup", + r->in.domain_name); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } smbconf_delete_global_parameter(ctx, "realm"); goto done; } - werr = smbconf_set_global_parameter(ctx, "security", "domain"); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "security", "domain"); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } - werr = smbconf_set_global_parameter(ctx, "workgroup", - r->out.netbios_domain_name); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "workgroup", + r->out.netbios_domain_name); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } if (r->out.domain_is_ad) { - werr = smbconf_set_global_parameter(ctx, "security", "ads"); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "security", "ads"); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } - werr = smbconf_set_global_parameter(ctx, "realm", - r->out.dns_domain_name); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "realm", + r->out.dns_domain_name); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } } done: @@ -1515,8 +1534,11 @@ static WERROR do_unjoin_modify_vals_config(struct libnet_UnjoinCtx *r) if (r->in.unjoin_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) { - werr = smbconf_set_global_parameter(ctx, "security", "user"); - W_ERROR_NOT_OK_GOTO_DONE(werr); + err = smbconf_set_global_parameter(ctx, "security", "user"); + if (!SBC_ERROR_IS_OK(err)) { + werr = WERR_NO_SUCH_SERVICE; + goto done; + } werr = smbconf_delete_global_parameter(ctx, "workgroup"); W_ERROR_NOT_OK_GOTO_DONE(werr); |