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

3817 Commits

Author SHA1 Message Date
Volker Lendecke
5f4de856af Convert dbwrap_trans_store to NTSTATUS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Volker Lendecke
f1dd915ce8 Add dbwrap_[fetch|store]_uint32
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-04-01 14:04:22 +02:00
Stefan Metzmacher
1c59142ccc sharesec: use db_open_trans()
metze
2008-04-01 14:04:21 +02:00
Volker Lendecke
bc9b4c43b8 Convert share_info.tdb to dbwrap 2008-04-01 14:04:21 +02:00
Gerald W. Carter
0c94918fb5 Patch from Nicholas Brealey <nick@brealey.org> to distinguish between WinXP and WinXP64.
Defines a new value for the %a variable when detecting a Windows XP 64-bit client.
2008-03-31 14:34:43 -05:00
Michael Adam
16b5800d4e Add a talloc context parameter to current_timestring() to fix memleaks.
current_timestring used to return a string talloced to talloc_tos().
When called by DEBUG from a TALLOC_FREE, this produced messages
"no talloc stackframe around, leaking memory". For example when
used from net conf.

This also adds a temporary talloc context to alloc_sub_basic().
For this purpose, the exit strategy is slightly altered: a common
exit point is used for success and failure.

Michael
2008-03-28 16:34:51 +01:00
Stefan Metzmacher
fcb497951a libreplace(samba4): let LIBREPLACE depend on LIBREPLACE_NETWORK for now
This should fix the build on solaris.
Later this needs better fixing...

metze
(cherry picked from commit 89b7955733c34e9699a3b43ee54de92cb9469b90)
2008-03-28 15:17:54 +01:00
Volker Lendecke
ce1bd43cda Fix a memory leak 2008-03-28 13:44:30 +01:00
Michael Adam
ab0aaed907 dbwrap: fix dbwrap_trans_[delete|store]() to stop when transaction_start() failed.
Michael
2008-03-27 18:14:57 +01:00
Stefan Metzmacher
74a070b8a2 dbwrap: add db_open_trans()
This should be used when transactions are wanted.
For now it's just a wrapper of db_open(), but this
will change.

metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Stefan Metzmacher
f05e889bc0 dbwrap: add dbwrap_trans_store_int32()
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-03-27 18:14:56 +01:00
Michael Adam
451fc9ae05 libreplace: fix coverity ID 517 - untangle close from open in test/os2_delete.c
This is not a proper bug but the code is clearer now
and we are tracking failure of open separate from that of close.

Michael
2008-03-27 11:46:39 +01:00
Michael Adam
ee46f0eca6 libsmbconf: text - pass the cache instead of all private data to pm_process.
Michael
2008-03-27 00:32:09 +01:00
Michael Adam
03efb72b46 libsmbconf: text - change the cache to be talloced
instead of having it directly as a member in the private data struct.
This makes it easier to flush and initialize the cache.

Michael
2008-03-27 00:32:09 +01:00
Michael Adam
8cb2881249 libsmbconf: in text backend, put flushing of the cache into a helper function.
And use it also in the close operation.

Michael
2008-03-27 00:32:09 +01:00
Gerald W. Carter
4ddf58dbdc Fix a bug in the output from print_canonical_sockaddr() fix from 36f8bafbd3dee66a8....
Make sure that IPv4 addresses are not enclised in []'s.
2008-03-26 16:58:27 -05:00
Michael Adam
4ea5084385 libsmbconf: add a text backend to libsmbconf based on the params.c parser.
This is a simple implementation of text backend for libsmbconf.
It is read only. It uses the parser from params.c. It loads the
given config file and holds the parsed lists of strings in memory.
Config is only re-read if the time stamp of the config file has changed.
Brilliant performance on large files is not to be expected since the
string lists are not hashed. This might be added in the future.

Michael
2008-03-26 14:55:05 +01:00
Michael Adam
6d72fc4373 smbconf: reformat - fix intentation.
This time this won't make me stumble, since there is no
magic in indented function headers here - no automatic
prototype generation... :-)

Michael
2008-03-26 11:15:04 +01:00
Michael Adam
cdde2e4eac util_tdb: remove trivial and unused tdb_wipe().
It has been replaced by tdb_wipe_all().

Michael
2008-03-26 11:15:03 +01:00
Michael Adam
3d2fdcd50f use tdb_wipe_all() instead of tdb_wipe() - it is faster...
Michael
2008-03-26 10:50:35 +01:00
Michael Adam
1c51bec531 util_tdb: make the _byblob fetch/store functions public again.
Users of these are currently being written...

Michael
2008-03-26 10:50:35 +01:00
Michael Adam
abf02a5a14 util_tdb: add my (C) for the tdb validation code
Michael
2008-03-25 15:55:34 +01:00
Michael Adam
d4be4e30cd util_tdb: add a wrapper tdb_wipe() for traverse with tdb_traverse_delete_fn().
Replace all callers of traverse with this tdb_traverse_delete_fn() and
don't export tdb_traverse_delete_fn() anymore.

Michael
2008-03-25 15:55:34 +01:00
Michael Adam
b42cf3fc69 util_tdb: make the _byblob functions static - not currently used elsewhere.
Michael
2008-03-25 15:55:34 +01:00
Gerald (Jerry) Carter
36f8bafbd3 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.
2008-03-24 17:25:13 -05:00
Volker Lendecke
94c29f5593 Fix Coverity ID 472
Simo, S4 also has this code. You might want to cherry-pick.

Volker
2008-03-23 18:28:24 +01:00
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