1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

3591 Commits

Author SHA1 Message Date
Volker Lendecke
9e0ee1ad4f Fix Coverity ID 436 2008-03-23 16:21:59 +01:00
Michael Adam
f4d87fdbf2 registry: fix registry_init_smbconf() to close the registry at the end.
Michael
2008-03-21 23:50:49 +01:00
Michael Adam
03e72e1307 libsmbconf: add internal open/close handling to registry backend.
This internally keeps track of opened registry in the private data
struct. The first call that really accesses data, opens the registry
and it is kept open until the destructor is called.

This behaviour might be changed in the future.

Michael
2008-03-21 23:43:52 +01:00
Michael Adam
513ae78ef7 libsmbconf: add a comment.
Michael
2008-03-21 22:55:20 +01:00
Michael Adam
a02163356b libsmbconf: add private_data section to smbconf_ctx.
This private data should be used by backends.
The token for the registry backend is moved from
the context to the private data section, since
this is registry specific.

Michael
2008-03-21 22:52:27 +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
4f816df276 libsmbconf: add structuring comments to the prototypes in the public header.
Michael
2008-03-21 16:45:25 +01:00
Michael Adam
83b9453c88 libsmbconf: adapt a comment to new circumstances
Michael
2008-03-21 16:42:42 +01:00
Michael Adam
e8ed8ad077 libsmbconf: group together functions in smbconf.c more appropriately
Michael
2008-03-21 16:40:20 +01:00
Michael Adam
8974b28368 libsmbconf: add a comment.
Michael
2008-03-21 16:35:52 +01:00
Michael Adam
431b10bfe0 libsmbconf: move registry implementation to a module of its own.
Michael
2008-03-21 16:26:50 +01:00
Volker Lendecke
b82cf75c82 Fix Coverity ID 473
Simo, S4 also has this bug, you might want to merge the fix.
2008-03-21 11:52:34 +01:00
Volker Lendecke
b19ea3635c Fix Coverity ID 537 2008-03-21 11:42:42 +01:00
Volker Lendecke
d69b8b19ae Fix Coverity ID 538 2008-03-21 11:41:15 +01:00
Michael Adam
1a5e5bf38f libsmbconf: reformaat - fix some whispacing/tabs
Michael
2008-03-21 02:29:09 +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
acbd1f40e0 libsmbconf: add shutdown handler to smbconf_ops.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
24f32d9bd9 libsmbconf: fix comments
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
77dbdf82ef libsmbconf: add open and close operations to the smbconf_ops.
Note: currently, reg_init_smbconf opens the registry, but does
not close it. This has to be changed. so that it is closed.
And then libsmbconf will need these open/close functions

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
a857f643d1 libsmbconf: introduce a smbconf_ops layer to allow interchangeable backends.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
f2d605006c libsmbconf: move smbconf_reg_initialize() down to the smbconf operations.
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d44c2ef0b7 libsmbconf: add existence check for service to smbconf_delete_share().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
26208d3e96 libsmbconf: add existence check for service to smbconf_get_share().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
5dac66c82a libsmbconf: add check for NULL servicename to smbconf_share_exists().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
103a37ac8e libsmbconf: fix a comment 2008-03-21 02:25:56 +01:00
Michael Adam
9448a7a298 libsmbconf: refactor out registry implementation of smbconf operations.
This leaves most of the api functions mere wrappers except for some
common initial checks.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
aeaf66c064 libsmbconf: refactor autocreation of [global] into a helper function.
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
a99ee5e536 libsmbconf: put the smbconf context struct into a private header.
Michael
2008-03-21 02:25:55 +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
7460697ea4 libsmbconf: fix indentation.
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
5b6b90900a libsmbconf: change smbconf_get_seqnum() to smbconf_changed().
The former seqnum is hidden inside a struct smbconf_csn.
And the get_seqnum is united with a changed function that
stores the seqnum inside the given csn.

Michael
2008-03-21 02:25:55 +01:00
Michael Adam
e6b60f6cad libsmbconf: fix a comment
Michael
2008-03-21 02:25:55 +01:00
Michael Adam
03a980d8f6 libreplace: replace.c does not need system/network.h anymore.
Michael
(cherry picked from commit 2d3c2f34f33338ff422047dae9cc262522689328)
2008-03-19 22:40:45 +01:00
Michael Adam
6c53753246 libreplace: move rep_socketpair() to its own module.
Prototype is now in system/network.h,
implementation in socketpair.c, and
check in socketpair.m4.

Now the last networking function has vanished from replace.c.

Michael
(cherry picked from commit 94ac8a25be15b55f66eff96fdddc2fdc71a43b1e)
2008-03-19 22:40:45 +01:00
Michael Adam
a4f22d6e2b libreplace: remove duplicate entry of inet_ntoa from README.
Michael
(cherry picked from commit 98ee8c84300757d778733a458c6ca3e6022b40ea)
2008-03-18 16:45:20 +01:00
Michael Adam
a1d24f110b libreplace: remove trailing white spaces.
Michael
(cherry picked from commit 1f9ca7eed965904f67cf78fbac007432b8a057fd)
2008-03-18 16:45:10 +01:00
Michael Adam
edcf2712bc libreplace: replace inet_ntoa() when it is missing
...not only replace it when it is broken.

This moves the defintion of rep_inet_ntoa from replace.c
to inet_ntoa.c and adds configure checks for existence
of inet_ntoa(). Checks are moved to an include file of its own.

NOTE: The original rep_inet_ntoa in replace.c was wrapped
into a "#ifndef WITH_PTHREADS" but the prototype in replace.h
and the define in system/network.h were not. I removed that
ifndef since the inet_ntoa() function is usually not thread safe
anyways, since it returns a pointer to a static buffer.

So whoever calls inet_ntoa() should be aware that it is not
thread safe anyways.

Michael
(cherry picked from commit 974c0c45ad42644348e0b55454715b12158f1028)
2008-03-18 16:44:59 +01:00
Michael Adam
f69e51f56f libreplace: put inet_aton.c under LGPL instead of GPL.
Michael
(cherry picked from commit cca5d6626fe395f08fd4c8b2344e4e43646cb987)
2008-03-18 16:35:46 +01:00
Stefan Metzmacher
f27d5e0cf8 libreplace: remove unused SOCKET_LIBS and NSL_LIBS
metze
(cherry picked from commit 62bb177a6e4a3e1f949b78c7cd7583f2e1271739)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
b141fce01d libreplace: for samba4 create LIBREPLACE_NETWORK as EXT_LIB
metze
(cherry picked from commit 79037c31334e271a718fcac234148038814b591e)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
7854ed24a5 libreplace: use LIBREPLACE_NETWORK_LIBS within some configure checks
...instead of using SOCKET_LIBS and NSL_LIBS.

metze
(cherry picked from commit cef2e8d748756f61c248ad6660e85dd1ac36308a)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
2dee62ed12 libreplace: combine SOCKET_LIBS and NSL_LIBS to LIBREPLACE_NETWORK_LIBS
But keep the old ones untill the callers are fixed.

metze
(cherry picked from commit e7115dcc8a0a4f420de7a901e3a21d4f35a6fcf9)
2008-03-18 16:34:12 +01:00
Volker Lendecke
7d7a73944c Fix bug 5334
I did not test with a zero length file :-)
2008-03-18 13:49:46 +01:00
Marc VanHeyningen
3fc85d2259 Coverity fixes 2008-03-17 20:52:25 +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
5315ef41f4 Move libnet_conf to a library lib/smbconf/ of its own, fixing the api.
The libnet_conf code to access the registry based configuration has
become more of a library used in several places in samba (e.g. loadparm)
than an abstraction of "net conf". So I move it to a location lib/smbconf/.

In the same breath, the api is fixed (not generated by make proto anymore).

Michael
2008-03-17 18:03:02 +01:00
Stefan Metzmacher
c22204aa85 socket_wrapper: make pcap code more portable
Now the pcap support works on x86_64.

metze
(cherry picked from commit 61a87bed61ef661d98131239976be95c6a8b4d96)
2008-03-17 16:41:02 +01:00
Volker Lendecke
46e50da0d5 Use right control to attach to persistent databases
This is a merge of 2a8f8b26f08ab09c34dff82417e541d8eb1ec91c and
4e6508dfee0d872a7fa42c9e58ba565137a27b3f from 3-0-ctdb
2008-03-17 14:56:45 +01:00