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

4528 Commits

Author SHA1 Message Date
Michael Adam
fb70a8a255 s3: Fix a memleak in dbwrap_rbt.
The SMB_MALLOC'ed rbt node data was not free'd on talloc free of
the db context. This is a quick fix using talloc instead of malloc
for allocation of the node data.

Since malloc was originally used for performance reasons, one
might want to reverse to malloc and create a talloc destructor
that walks the tree and frees all the node data if this talloc
approach proves to be too slow..

Michael
2009-03-04 11:23:05 +01:00
Jeremy Allison
4b2955aa7d Fix "ignore return" warning.
Jeremy.
2009-03-03 08:50:35 -08:00
Simo Sorce
1ea0dca50a Fix wbclient.c wrt tevent_req changes too. 2009-03-02 15:38:45 -05:00
Volker Lendecke
9cacb49eb6 Attempt to fix the build
Simo, with which compiler did you build this? I'd be curious to learn about the
compiler settings that make this build.

Thanks,

Volker
2009-03-02 20:17:40 +01:00
Simo Sorce
67d41d0fc7 Make struct tevent_req opaque
Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.

The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data

This way it is much simpler to keep API/ABI compatibility in the future.
2009-03-02 11:02:09 -05:00
Jelmer Vernooij
0a3ee53b50 Use samba3's own iconv implementation for now, until all changes are
merged.
2009-03-02 05:04:07 +01:00
Tim Prouty
9b0df441e1 s3: Fix incompatible type warnings 2009-03-01 16:40:17 -08:00
Jelmer Vernooij
9551ab8f7b Merge branch 'master' of git://git.samba.org/samba into convenience 2009-03-01 22:25:57 +01:00
Jelmer Vernooij
7ab8f373c8 Use common header file for character set handling in Samba 3 and Samba 4. 2009-03-01 22:24:34 +01:00
Jelmer Vernooij
da6721e323 Move secacl to top-level. 2009-03-01 18:15:36 +01:00
Jelmer Vernooij
99b288156f Move secace.c to top-level. 2009-03-01 18:00:26 +01:00
Jelmer Vernooij
54bc27e937 Merge branch 'master' of ssh://git.samba.org/data/git/samba into talloc-next 2009-03-01 16:23:53 +01:00
Jelmer Vernooij
d776ac03c3 Move next_token_talloc() to top-level. 2009-03-01 16:16:16 +01:00
Jelmer Vernooij
e6ec32f3ac Eliminate two duplicate SEC_ACE_TYPE constants already provided by
security.idl.
2009-03-01 04:59:07 +01:00
Volker Lendecke
5686a6d91a Fix async reading winbindd_response 2009-02-28 12:32:28 +01:00
Volker Lendecke
6cdcfa3fc1 Remove a temporary debug message -- sorry 2009-02-26 13:26:12 +01:00
Volker Lendecke
a777b4d501 Convert open_socket_out to tevent_req 2009-02-26 13:04:34 +01:00
Michael Adam
bd121b532c s3:libsmbconf: add transactions to the libsmbconf api
This is useful for wrapping higher level aggregate operations
in transactions. The text backend implementations just return
WERR_OK, the registry backend implementatoins use the
regdb_transaction_start|commit|cancel routines just added.

Michael
2009-02-26 11:05:23 +01:00
Volker Lendecke
aeb26fe911 Add db_tdb_parse
Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Volker Lendecke
9475e88bea Add dbwrap->parse_record
Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:22 +01:00
Volker Lendecke
16f61a6f90 Speed up "net conf list"
For 1000 shares this speeds up net conf list from .6 to .25 seconds on my box

Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:21 +01:00
Volker Lendecke
26f238466c Speed up "net conf list"
With 1000 shares in the registry, this changed the time of "net conf list" from
1.1 seconds to .6 seconds.

Signed-off-by: Michael Adam <obnox@samba.org>
2009-02-26 11:05:21 +01:00
Tim Prouty
95e428e227 s3: Report the correct path when dumping core on FreeBSD
Utilize the kern.corefile sysctl value on FreeBSD
2009-02-25 13:57:11 -08:00
Tim Prouty
7f33b947e3 s3: Refactor and cleanup the error paths in dump_core_setup 2009-02-25 13:57:11 -08:00
Stefan Metzmacher
543db0f94a s3:events: map TEVENT_DEBUG_TRACE to debug level 10
metze
2009-02-25 15:05:49 +01:00
Tim Prouty
9bb1bea537 s3: Fix a bug that prevent core files from being created
Removed an erroneous free() that was causing the corepath to be NULL
during dump_core().  This prevented dump_core() from actually calling
abort() to create a core file.  The bug was introduced in December by:
07e0094365
2009-02-24 14:07:51 -08:00
Volker Lendecke
5766bf896c Use read_packet for wb_resp_read 2009-02-24 20:40:48 +01:00
Volker Lendecke
0089018270 Use read_packet for wb_req_read 2009-02-24 20:40:48 +01:00
Volker Lendecke
202a31d96d Remove read_pkt 2009-02-24 20:40:48 +01:00
Volker Lendecke
ae1a0b5534 Use async writev for wb_resp_write 2009-02-24 20:40:47 +01:00
Volker Lendecke
53b059fc52 Use async writev in wb_req_write 2009-02-24 20:40:47 +01:00
Volker Lendecke
39976035eb Convert async_connect to tevent_req 2009-02-24 20:40:47 +01:00
Günther Deschner
f21ae452a0 s3-lib: add marshall_sec_desc_buf and unmarshall_sec_desc_buf helpers.
Guenther
2009-02-24 12:41:20 +01:00
Steven Danneman
8d63c596a0 Refactored sys_fork() and sys_pid() into shared util library
This fixes a bug in 116ce19b, where we didn't clear the pid cache in
become_daemon() and thus the /var/run/smbd.pid didn't match the actual
pid of the parent process.

Currently S4 will clear the pid cache on fork but doesn't yet take
advantage of the pid cache by using sys_pid() instead of the direct
get_pid().
2009-02-23 21:17:12 -08:00
Jeremy Allison
faa1100d22 More warning fixes for Solaris.
Jeremy.
2009-02-23 16:22:43 -08:00
Steven Danneman
193be432a2 s3: Refactor of madvise() usage in c441f58d
* move to reinit_after_fork() to protect all Samba daemons
* only protect parent processes
2009-02-20 16:30:13 -08:00
Steven Danneman
116ce19b10 Moved become_daemon() and close_low_fds() to shared util lib 2009-02-20 16:30:12 -08:00
Tim Prouty
e4675ce8db s3: Add extid to the dev/inode pair
This extends the file_id struct to add an additional generic uint64_t
field: extid.  For backwards compatibility with dev/inodes stored in
xattr_tdbs and acl_tdbs, the ext id is ignored for these databases.
This patch should cause no functional change on systems that don't use
SMB_VFS_FILE_ID_CREATE to set the extid.

Existing code that uses the smb_share_mode library will need to be
updated to be compatibile with the new extid.
2009-02-19 20:58:26 -08:00
Tim Prouty
6fbebb5369 s3: Modify SMB_VFS_FILE_ID_CREATE to take a stat struct
Since file_id_create_dev is incompatible with the concept of file_ids,
it is now static and in the one file that needs it.
2009-02-19 20:58:01 -08:00
Volker Lendecke
9823b4343d Fix an uninitialized variable 2009-02-19 21:00:29 +01:00
todd stecher
03421944b2 S3: Stop creating SMBD cores when failing to create a pipe.
This was uncovered when the MAX FD limit was hit, causing an instant core
and invoking error reporting. This fix causes SMBD to exit, but without
building a core.
2009-02-18 18:08:33 -08:00
Jeremy Allison
3737b758d6 Fix warning about missmatch of uint32_t and size_t.
Jeremy.
2009-02-17 13:18:10 -08:00
Günther Deschner
dc7f04aac7 s3-netapi: fix Coverity #881 and #882.
Guenther
2009-02-17 10:21:22 +01:00
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Björn Jacke
263b798db9 tidy up timestamp checks
AC_CHECK_MEMBERS should be a sufficient check, there's no need to do manual
compile tests. We can also assume that we have ctime and atime members when we
have the mtime member.
2009-02-12 13:00:44 +01:00
Dan Sledz
3b8a57e064 s3: Implement wbcGetSidAliases
* Adds wbcGetSidAliases that calls the lookup_useraliases function.
* Updates wbinfo and winbind_util.c to call the new function.
* Also added winbind_get_groups helper function.
2009-02-11 19:39:18 -08:00
Dan Sledz
aed8e9aa0a s3: Implement wbcGetpwsid
* Adds the plumbing required to lookup users by sid into winbind, wbinfo
  and smbd helper lib (winbind_util.c).
* Removes some double declarations of winbind_util.c functions.
* Bumps the winbind protocol version to 21 and the minor version of
  wbclient to 3.
2009-02-11 19:39:15 -08:00
todd stecher
9d4d2f70cb S3: Fixes for coverity issues. 2009-02-10 14:43:14 -08:00
Volker Lendecke
47cb572d40 Add read_pkt_send/recv 2009-02-10 18:29:34 +01:00
Tim Prouty
c6f1f055fd s3 oplocks: Make the level2 oplock contention API more granular
This replaces release_level2_oplocks_on_change with
contend_level2_oplock_begin/end in order to contend level2 oplocks
throughout an operation rather than just at the begining.  This is
necessary for some kernel oplock implementations, and also lays the
groundwork for better correctness in Samba's standard level2 oplock
handling.  The next step for non-kernel oplocks is to add additional
state to the share mode lock struct that prevents any new opens from
granting oplocks while a contending operation is in progress.

All operations that contend level 2 oplocks are now correctly spanned
except for aio and synchronous writes.  The two write paths both have
non-trivial error paths that need extra care to get right.

RAW-OPLOCK and the rest of 'make test' are still passing with this
change.
2009-02-09 23:47:45 -08:00