summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-04-08 15:48:01 +0200
committerMichael Adam <obnox@samba.org>2011-05-10 19:13:20 +0200
commit7af2876e4526d348a1e601f2d14776e08d4668cb (patch)
tree26fe48b14825073cc6e84e893e006fbf4b47f2f7 /source3/utils
parent823cd472b42c276a48bd368655f28dfa9ae7d430 (diff)
downloadsamba-7af2876e4526d348a1e601f2d14776e08d4668cb.tar.gz
samba-7af2876e4526d348a1e601f2d14776e08d4668cb.tar.bz2
samba-7af2876e4526d348a1e601f2d14776e08d4668cb.zip
libsmbconf: Convert smbconf_create_share() to smbErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_conf.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 192088c6ba..3b6005a2b9 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -180,6 +180,7 @@ static WERROR import_process_service(struct net_context *c,
{
uint32_t idx;
WERROR werr = WERR_OK;
+ sbcErr err;
uint32_t num_includes = 0;
char **includes = NULL;
TALLOC_CTX *mem_ctx = talloc_stackframe();
@@ -205,8 +206,9 @@ static WERROR import_process_service(struct net_context *c,
goto done;
}
}
- werr = smbconf_create_share(conf_ctx, service->name);
- if (!W_ERROR_IS_OK(werr)) {
+ err = smbconf_create_share(conf_ctx, service->name);
+ if (!SBC_ERROR_IS_OK(err)) {
+ werr = WERR_GENERAL_FAILURE;
goto done;
}
@@ -578,6 +580,7 @@ static int net_conf_addshare(struct net_context *c,
{
int ret = -1;
WERROR werr = WERR_OK;
+ sbcErr err;
char *sharename = NULL;
const char *path = NULL;
const char *comment = NULL;
@@ -714,10 +717,10 @@ static int net_conf_addshare(struct net_context *c,
* create the share
*/
- werr = smbconf_create_share(conf_ctx, sharename);
- if (!W_ERROR_IS_OK(werr)) {
+ err = smbconf_create_share(conf_ctx, sharename);
+ if (!SBC_ERROR_IS_OK(err)) {
d_fprintf(stderr, _("Error creating share %s: %s\n"),
- sharename, win_errstr(werr));
+ sharename, sbcErrorString(err));
goto cancel;
}
@@ -820,6 +823,7 @@ static int net_conf_setparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
{
int ret = -1;
WERROR werr = WERR_OK;
+ sbcErr err;
char *service = NULL;
char *param = NULL;
const char *value_str = NULL;
@@ -855,10 +859,10 @@ static int net_conf_setparm(struct net_context *c, struct smbconf_ctx *conf_ctx,
}
if (!smbconf_share_exists(conf_ctx, service)) {
- werr = smbconf_create_share(conf_ctx, service);
- if (!W_ERROR_IS_OK(werr)) {
+ err = smbconf_create_share(conf_ctx, service);
+ if (!SBC_ERROR_IS_OK(err)) {
d_fprintf(stderr, _("Error creating share '%s': %s\n"),
- service, win_errstr(werr));
+ service, sbcErrorString(err));
goto cancel;
}
}