1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

118 Commits

Author SHA1 Message Date
Kai Blin
1e9319cf88 net: Remove globals 2008-05-10 09:22:27 +02:00
Michael Adam
17415e2dc4 libsmbconf: rewrite API to use smbconf_service struct
instead of lists of strings and counters directly...

Michael
2008-04-23 01:43:31 +02:00
Michael Adam
0212b38913 net conf: adapt output of NULL share params in net conf list.
don't list NULL share name and don't indent these parameters

Michael
2008-04-15 17:40:27 +02:00
Michael Adam
367c8b133b net conf: simplify logic in test output of net conf import.
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
5424e07e7d net conf: fix output of out-of-share parameters in test mode import
Michael
2008-04-15 17:40:27 +02:00
Michael Adam
281c9287a3 net conf: use the new smbconf_init() dispatcher instead of explicit backend init.
Michael
2008-04-13 20:04:44 +02:00
Michael Adam
e8bafcfbf4 libsmbconf: remove the bool verbatim parameter from txt backend init function.
Always be verbatim for now. Backend config options may be added later
via some private data pointer.

Michael
2008-04-13 20:04:43 +02:00
Michael Adam
977cc98989 net conf: use talloc and talloc_strdup_lower throughout all net conf functions.
Michael
2008-04-10 01:29:03 +02:00
Michael Adam
a1d09f34ec net conf: implement "net conf delincludes".
usage: "net conf delincludes <servicename>"

This is equivalent to "net conf setincludes <servicename>"
(without further arguments).

Michael
2008-04-10 01:29:03 +02:00
Michael Adam
ab51e4d44c net conf: implement a "net conf setincludes" command.
given zero or more filenames as command line parameters

Michael
2008-04-10 01:29:03 +02:00
Michael Adam
30bc48623c net conf: implement "net conf getincludes".
Michael
2008-04-10 01:29:02 +02:00
Michael Adam
8f2c3efa67 net conf: add diagnostic message for failure to load text file.
Michael
2008-04-10 01:29:02 +02:00
Michael Adam
97f9cb8575 net conf: reduce indentation by grouping testmode code together.
Michael
2008-04-10 01:29:02 +02:00
Michael Adam
74e87b9775 net conf: don't drop config in testmode
Michael
2008-04-10 01:29:02 +02:00
Michael Adam
3e81db8370 net conf: fix import to correctly add includes (at the end)
Michael
2008-04-10 01:29:02 +02:00
Michael Adam
b9e72b402d libsmbconf: add a "verbatim" parameter to smbconf_init_txt_simple().
Michael
2008-04-10 01:28:56 +02:00
Michael Adam
cd17cc745a net_conf: fix non-testmode import function.
Michael
2008-03-27 00:32:09 +01:00
Michael Adam
9ef9d4c4e7 net_conf: reformat - re-indent one function call.
Michael
2008-03-26 14:55:06 +01:00
Michael Adam
1c6b9a0ac3 net_conf: add casts to avoid compiler warnings.
Michael
2008-03-26 14:55:06 +01:00
Michael Adam
5171df66eb net_conf: rename "ctx" to "mem_ctx" for clarity.
There are also smbconf contexts arount...

Michael
2008-03-26 14:55:06 +01:00
Michael Adam
ab4fd03705 net_conf: use talloc_stackframe() instead of talloc_init().
Michael
2008-03-26 14:55:06 +01:00
Michael Adam
e41c6650f8 net_conf: fix import function by using the new text backend of smbconf.
Originally, lp_load() was used to import files to registry.
This had several bugs. Most notably, options explicitly set to
default values were silently dropped, and all parametric options
were ignored.

This new implementation reads config from the text backend and
stuffs everything verbatim in to the registry backend.

Michael
2008-03-26 14:55:06 +01:00
Michael Adam
96434d9dc7 libsmbconf: add a "path" variable to the conf context.
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.

In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.

Michael
2008-03-21 18:19:24 +01:00
Michael Adam
b3f6920ccb libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
797b26ad3f libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d7bd9bb8aa libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
304dba6cb2 libsmbconf: change the API to always take the smbconf_ctx parameter first.
..for consistency. Exception: the open/init function, where the smbconf_ctx
is created from the given talloc context.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
097af0309d libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
2008-03-17 18:03:02 +01:00
Michael Adam
b3afc8391d Add and modify comments in net_conf.c
Michael
2008-01-13 23:45:57 +01:00
Michael Adam
b5c533b06c Add explicit creation of shares to net conf import function.
It has been removed from libnet_conf_set_parameter().

Michael
2008-01-13 23:30:08 +01:00
Michael Adam
c2a9346faa Introduce a libnet_conf context created by libnet_conf_open().
The libnet_conf_ctx stores the information necessary to interoperate
with the configuration. It is created by calling libnet_conf_open()
and destroyed by calling libnet_conf_close(). The context is passed
to all the libnet_conf functions. It currently stores the token to
access the registry. Later, it could store more data, e.g. the server
to connect to, credentials, and so on. For support of other backends
than registry or support of remote configuration, only the open
function will have to be changed.

In net_conf, the calls to the actual net_conf functions is wrapped
into a function that calls libnet_conf_open()/_close(). Thus an
individual variant of net_conf_runfunction2() and functable2 is
used to cope with functions being called by the wrapper with the
additional libnet_conf_ctx argument.

Michael
2008-01-13 02:14:34 +01:00
Michael Adam
a4ef828102 Fix spacing - spaces mixed with tabs.
Michael
2008-01-04 21:16:48 +01:00
Michael Adam
fc9c3f39b5 Fix a comment.
Michael
2008-01-04 21:09:55 +01:00
Michael Adam
8d9e3e08f3 Remove the word "registry" from the help output of the "net conf" command.
Michael
2008-01-04 21:05:59 +01:00
Michael Adam
e166b88637 Update the introductory comment to net_conf.c to mention linbet_conf.
Michael
2008-01-04 21:05:59 +01:00
Michael Adam
790ef78944 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
2008-01-04 19:52:22 +01:00
Michael Adam
fc0fca980f 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
2008-01-04 19:49:57 +01:00
Günther Deschner
a43125d9e9 Fix build warning.
Guenther
2008-01-04 17:43:23 +01:00
Michael Adam
77713e7764 Make libnet_conf handle opening/initialization of the registry.
Open state is currently tracked by a global variable
to avoid double initialization.

Later, this can possibly be replaced by a conf-context
created by an initialization function and passed around
to the other api functions.

Michael
2008-01-03 15:33:09 +01:00
Michael Adam
073eeca51e Rename libnet_smbconf_delparm() to libnet_conf_delete_parameter().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
d08556dbc7 Rename libnet_smbconf_getparm() to libnet_conf_get_parameter().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
e00cb415d3 Rename libnet_smbconf_setparm() to libnet_conf_set_parameter().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
2075baf551 Rename libnet_smbconf_delshare() to libnet_conf_delete_share().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
1575612f19 Rename libnet_smbconf_getshare() to libnet_conf_get_share().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
6bc4ee2108 Rename libnet_smbconf_create_share() to libnet_conf_create_share().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
3258758e5c Rename libnet_smbconf_share_exists() to libnet_conf_share_exists().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
2e4beee66b Rename libnet_smbconf_get_share_names() to libnet_conf_get_share_names().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
e8f7c07699 Rename libnet_smbconf_get_config() to libnet_conf_get_config().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
42ae33a962 Rename libnet_smbconf_drop() to libnet_conf_drop().
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
e568f42e21 Happy new year again.
Michael
2008-01-03 14:17:48 +01:00