diff options
author | Michael Adam <obnox@samba.org> | 2008-01-03 11:30:14 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-01-03 11:30:14 +0100 |
commit | fd597c7e6d1b5d89c75dd24f2b62916ec81a67ae (patch) | |
tree | 9df3a6f4b4cc1b291f529aca6597d89ae908573f /source3/utils | |
parent | 40079c4eb47b590a88ac8d568a5d5f039bc02af6 (diff) | |
download | samba-fd597c7e6d1b5d89c75dd24f2b62916ec81a67ae.tar.gz samba-fd597c7e6d1b5d89c75dd24f2b62916ec81a67ae.tar.bz2 samba-fd597c7e6d1b5d89c75dd24f2b62916ec81a67ae.zip |
Add libnet_conf API function libnet_smbconf_create_share().
And make libnet_smbconf_setparm() return error if the share
does not already exist. Adapt net_conf_addshare to this new
situation.
Michael
(This used to be commit de349bd26db3341815f6d8f6c18a5ca1fd664dca)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_conf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c index 07eb3b890f..feee16f564 100644 --- a/source3/utils/net_conf.c +++ b/source3/utils/net_conf.c @@ -628,7 +628,18 @@ static int net_conf_addshare(int argc, const char **argv) } /* - * create the share by adding the parameters + * create the share + */ + + werr = libnet_smbconf_create_share(sharename); + if (!W_ERROR_IS_OK(werr)) { + d_fprintf(stderr, "Error creating share %s: %s\n", + sharename, dos_errstr(werr)); + goto done; + } + + /* + * fill the share with parameters */ werr = libnet_smbconf_setparm(sharename, "path", path); |