[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-1063-g790ef78

Michael Adam obnox at samba.org
Fri Jan 4 18:53:17 GMT 2008


The branch, v3-2-test has been updated
       via  790ef789444945fbae5637f0b469665859171dcd (commit)
       via  fc0fca980f08a0af65d82784ef5a50a7b1ac0927 (commit)
      from  a43125d9e9052fab8eb561976f45d1db4622482e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 790ef789444945fbae5637f0b469665859171dcd
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jan 4 19:52:22 2008 +0100

    Remove the final regdb_close() from net_conf.c
    
    This is to hide the registry from net_conf.
    Right now, it does not harm if "net conf" does not close
    the registry file explicitly just before exiting.
    I am working out a proper way of handling open/close
    operations transparently in the libnet_conf library.
    
    Michael

commit fc0fca980f08a0af65d82784ef5a50a7b1ac0927
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jan 4 19:49:57 2008 +0100

    Fix the behaviour of "net conf setparm" to create the share if necessary.
    
    This moves functionality taken away from libnet_conf_set_parameter() to the
    higher level user frontend function. (Somehow I thought I had done this
    already ... :-)
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 source/utils/net_conf.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/utils/net_conf.c b/source/utils/net_conf.c
index 63d5477..d212b45 100644
--- a/source/utils/net_conf.c
+++ b/source/utils/net_conf.c
@@ -719,6 +719,15 @@ static int net_conf_setparm(int argc, const char **argv)
 	param = strdup_lower(argv[1]);
 	value_str = argv[2];
 
+	if (!libnet_conf_share_exists(service)) {
+		werr = libnet_conf_create_share(service);
+		if (!W_ERROR_IS_OK(werr)) {
+			d_fprintf(stderr, "Error creating share '%s': %s\n",
+				  service, dos_errstr(werr));
+			goto done;
+		}
+	}
+
 	werr = libnet_conf_set_parameter(service, param, value_str);
 
 	if (!W_ERROR_IS_OK(werr)) {
@@ -854,8 +863,6 @@ int net_conf(int argc, const char **argv)
 
 	ret = net_run_function2(argc, argv, "net conf", func);
 
-	regdb_close();
-
 	return ret;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list