1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

3593 Commits

Author SHA1 Message Date
Gerald (Jerry) Carter
22d7cd6605 Ignore port when pulling IP addr from struct sockaddr_storage.
Linux man page states that getaddinfo() will leave the port
uninitialized when passing in NULL for the service name.  So we
can't really trust that anymore.  I doubt non-default KDC ports
are an issues so just drop the port from the generated krb5.conf.
AIX exhibits this bug the most.
(This used to be commit 36f8bafbd3)
2008-03-24 17:25:13 -05:00
Volker Lendecke
3d28e7533f Fix Coverity ID 472
Simo, S4 also has this code. You might want to cherry-pick.

Volker
(This used to be commit 94c29f5593)
2008-03-23 18:28:24 +01:00
Volker Lendecke
fd9efee21d Fix Coverity ID 436
(This used to be commit 9e0ee1ad4f)
2008-03-23 16:21:59 +01:00
Michael Adam
9ec7af58c6 registry: fix registry_init_smbconf() to close the registry at the end.
Michael
(This used to be commit f4d87fdbf2)
2008-03-21 23:50:49 +01:00
Michael Adam
a81ed36e86 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
(This used to be commit 03e72e1307)
2008-03-21 23:43:52 +01:00
Michael Adam
aa3e4d56cb libsmbconf: add a comment.
Michael
(This used to be commit 513ae78ef7)
2008-03-21 22:55:20 +01:00
Michael Adam
be97af0edb 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
(This used to be commit a02163356b)
2008-03-21 22:52:27 +01:00
Michael Adam
6f7cfeddd6 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
(This used to be commit 96434d9dc7)
2008-03-21 18:19:24 +01:00
Michael Adam
40ea88db5e libsmbconf: add structuring comments to the prototypes in the public header.
Michael
(This used to be commit 4f816df276)
2008-03-21 16:45:25 +01:00
Michael Adam
e62cae6638 libsmbconf: adapt a comment to new circumstances
Michael
(This used to be commit 83b9453c88)
2008-03-21 16:42:42 +01:00
Michael Adam
5e1eca34f3 libsmbconf: group together functions in smbconf.c more appropriately
Michael
(This used to be commit e8ed8ad077)
2008-03-21 16:40:20 +01:00
Michael Adam
44dc10d808 libsmbconf: add a comment.
Michael
(This used to be commit 8974b28368)
2008-03-21 16:35:52 +01:00
Michael Adam
890d1d8f78 libsmbconf: move registry implementation to a module of its own.
Michael
(This used to be commit 431b10bfe0)
2008-03-21 16:26:50 +01:00
Volker Lendecke
4f4f1dfbb6 Fix Coverity ID 473
Simo, S4 also has this bug, you might want to merge the fix.
(This used to be commit b82cf75c82)
2008-03-21 11:52:34 +01:00
Volker Lendecke
e14f26f22b Fix Coverity ID 537
(This used to be commit b19ea3635c)
2008-03-21 11:42:42 +01:00
Volker Lendecke
7ca6192c1a Fix Coverity ID 538
(This used to be commit d69b8b19ae)
2008-03-21 11:41:15 +01:00
Michael Adam
8ae2afa3c8 libsmbconf: reformaat - fix some whispacing/tabs
Michael
(This used to be commit 1a5e5bf38f)
2008-03-21 02:29:09 +01:00
Michael Adam
fececde181 libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
(This used to be commit b3f6920ccb)
2008-03-21 02:25:56 +01:00
Michael Adam
6c20e83294 libsmbconf: add shutdown handler to smbconf_ops.
Michael
(This used to be commit acbd1f40e0)
2008-03-21 02:25:56 +01:00
Michael Adam
095048f2df libsmbconf: fix comments
Michael
(This used to be commit 24f32d9bd9)
2008-03-21 02:25:56 +01:00
Michael Adam
23b1d721b8 libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
(This used to be commit 797b26ad3f)
2008-03-21 02:25:56 +01:00
Michael Adam
adf5bf554c libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
(This used to be commit d7bd9bb8aa)
2008-03-21 02:25:56 +01:00
Michael Adam
ac7c582ec0 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
(This used to be commit 77dbdf82ef)
2008-03-21 02:25:56 +01:00
Michael Adam
2135f7dd61 libsmbconf: introduce a smbconf_ops layer to allow interchangeable backends.
Michael
(This used to be commit a857f643d1)
2008-03-21 02:25:56 +01:00
Michael Adam
f12b10566d libsmbconf: move smbconf_reg_initialize() down to the smbconf operations.
Michael
(This used to be commit f2d605006c)
2008-03-21 02:25:56 +01:00
Michael Adam
d19e308a14 libsmbconf: add existence check for service to smbconf_delete_share().
Michael
(This used to be commit d44c2ef0b7)
2008-03-21 02:25:56 +01:00
Michael Adam
94ef924800 libsmbconf: add existence check for service to smbconf_get_share().
Michael
(This used to be commit 26208d3e96)
2008-03-21 02:25:56 +01:00
Michael Adam
fbd2c552ea libsmbconf: add check for NULL servicename to smbconf_share_exists().
Michael
(This used to be commit 5dac66c82a)
2008-03-21 02:25:56 +01:00
Michael Adam
4c7214aae2 libsmbconf: fix a comment
(This used to be commit 103a37ac8e)
2008-03-21 02:25:56 +01:00
Michael Adam
73f8c1c68c libsmbconf: refactor out registry implementation of smbconf operations.
This leaves most of the api functions mere wrappers except for some
common initial checks.

Michael
(This used to be commit 9448a7a298)
2008-03-21 02:25:55 +01:00
Michael Adam
1e8d72aec9 libsmbconf: refactor autocreation of [global] into a helper function.
Michael
(This used to be commit aeaf66c064)
2008-03-21 02:25:55 +01:00
Michael Adam
7b53c84fe1 libsmbconf: put the smbconf context struct into a private header.
Michael
(This used to be commit a99ee5e536)
2008-03-21 02:25:55 +01:00
Michael Adam
153ed797e6 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
(This used to be commit 304dba6cb2)
2008-03-21 02:25:55 +01:00
Michael Adam
fc730cac35 libsmbconf: fix indentation.
Michael
(This used to be commit 7460697ea4)
2008-03-21 02:25:55 +01:00
Michael Adam
7621b4c3d8 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
(This used to be commit 5b6b90900a)
2008-03-21 02:25:55 +01:00
Michael Adam
77dd53ad5c libsmbconf: fix a comment
Michael
(This used to be commit e6b60f6cad)
2008-03-21 02:25:55 +01:00
Michael Adam
bb1b4403b4 libreplace: replace.c does not need system/network.h anymore.
Michael
(cherry picked from commit 2d3c2f34f3)
(This used to be commit 03a980d8f6)
2008-03-19 22:40:45 +01:00
Michael Adam
b57d67c406 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 94ac8a25be)
(This used to be commit 6c53753246)
2008-03-19 22:40:45 +01:00
Michael Adam
d8b6902c24 libreplace: remove duplicate entry of inet_ntoa from README.
Michael
(cherry picked from commit 98ee8c8430)
(This used to be commit a4f22d6e2b)
2008-03-18 16:45:20 +01:00
Michael Adam
e88e6568e4 libreplace: remove trailing white spaces.
Michael
(cherry picked from commit 1f9ca7eed9)
(This used to be commit a1d24f110b)
2008-03-18 16:45:10 +01:00
Michael Adam
5c73dabd49 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 974c0c45ad)
(This used to be commit edcf2712bc)
2008-03-18 16:44:59 +01:00
Michael Adam
a4d7cbcb2f libreplace: put inet_aton.c under LGPL instead of GPL.
Michael
(cherry picked from commit cca5d6626f)
(This used to be commit f69e51f56f)
2008-03-18 16:35:46 +01:00
Stefan Metzmacher
32b756258c libreplace: remove unused SOCKET_LIBS and NSL_LIBS
metze
(cherry picked from commit 62bb177a6e)
(This used to be commit f27d5e0cf8)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
ecf70c9a54 libreplace: for samba4 create LIBREPLACE_NETWORK as EXT_LIB
metze
(cherry picked from commit 79037c3133)
(This used to be commit b141fce01d)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
aa42e5ecac libreplace: use LIBREPLACE_NETWORK_LIBS within some configure checks
...instead of using SOCKET_LIBS and NSL_LIBS.

metze
(cherry picked from commit cef2e8d748)
(This used to be commit 7854ed24a5)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
0a80f6bfb4 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 e7115dcc8a)
(This used to be commit 2dee62ed12)
2008-03-18 16:34:12 +01:00
Volker Lendecke
16cbc22a99 Fix bug 5334
I did not test with a zero length file :-)
(This used to be commit 7d7a73944c)
2008-03-18 13:49:46 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Michael Adam
6274929b1e libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
(This used to be commit 097af0309d)
2008-03-17 18:03:02 +01:00
Michael Adam
670418c116 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
(This used to be commit 5315ef41f4)
2008-03-17 18:03:02 +01:00