summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-18s3: remove POLICY_HND.Günther Deschner1-2/+2
Guenther
2009-03-17Remove the global "struct cm_cred_struct" and associated calls, makeJeremy Allison1-0/+40
callers pass in a struct user_auth_info * instead. This commit causes smbc_set_credentials() to print out a message telling callers to use smbc_set_credentials_with_fallback() instead, as smbc_set_credentials() has a broken API (no SMBCCTX * pointer). No more global variables used in the connection manager API for client dfs calls. Jeremy.
2009-03-16Add some appropriate const.Jeremy Allison1-8/+8
Jeremy.
2009-03-04s3: Remove madvise supportSteven Danneman1-7/+0
This reverts 193be432. The MADVISE_PROTECT is inherited by all child processes and cannot be unset. The intention of the original patch was to protect the parent process, but allow children to be killed in low memory. Since this isn't possible with the current API, reverting the whole feature.
2009-02-24Remove read_pktVolker Lendecke1-99/+0
2009-02-20s3: Refactor of madvise() usage in c441f58dSteven Danneman1-0/+7
* move to reinit_after_fork() to protect all Samba daemons * only protect parent processes
2009-02-20Moved become_daemon() and close_low_fds() to shared util libSteven Danneman1-67/+0
2009-02-13Replace get_myname() with the talloc version from v3-3-testVolker Lendecke1-30/+1
2009-02-10Add read_pkt_send/recvVolker Lendecke1-0/+99
2009-01-31Remove the global variable "chain_size"Volker Lendecke1-3/+0
2009-01-29s3: Add a new SMB_VFS_GET_ALLOC_SIZE vfs operationTim Prouty1-1/+10
This allows module implementors to customize what allocation size is returned to the client.
2009-01-20s3: reinit_after_fork() should reinit the event context before the messaging ↵Stefan Metzmacher1-4/+4
context Because messaging_reinit() may add events to the event context, which will removed by event_context_reinit(). metze
2009-01-15Allow reinit_after_fork to be called safely from within swat and other ↵Jeremy Allison1-10/+14
binaries that don't have an event context or a msg context. Fixes crash bug in swat. Jeremy.
2009-01-12Make STATEDIR and CACHEDIR configurable through ./configure and loadparm.cSteven Danneman1-14/+46
If they are not explicitely set in either place both will default to LOCKDIR. Signed-off-by: Michael Adam <obnox@samba.org>
2009-01-05clean event context after child is forked.Bo Yang1-0/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-31Rename parent_dirname_talloc() to parent_dirname()Volker Lendecke1-2/+2
2008-12-31Remove unused function parent_dirnameVolker Lendecke1-13/+0
2008-12-31Make use of TALLOC_MEMDUP in parent_dirname_talloc()Volker Lendecke1-2/+1
2008-12-31Remove unused function get_numlist()Volker Lendecke1-51/+0
2008-12-14Remove the global "cmdline_auth_info" from source3/lib/util.cVolker Lendecke1-62/+81
This involves changing all our clients, that's why it's so large.
2008-11-28Move cli_trans_oob to lib/util.cVolker Lendecke1-0/+19
Rename it to trans_oob, it will be used in the server routines.
2008-11-06Make us clean under valgrind --leak-check=full by using ↵Jeremy Allison1-3/+3
talloc_autofree_context() instead of NULL. Remove the code in memcache that does a TALLOC_FREE on stored pointers. That's a disaster waiting to happen. If you're storing talloc'ed pointers, you can't know their lifecycle and they should be deleted when their parent context is deleted, so freeing them at some arbitrary point later will be a double-free. Jeremy.
2008-10-19Remove silly safe_free() function which is a wrapper around SAFE_FREE().Jelmer Vernooij1-11/+0
Since it's a function it just sets the local pointer to NULL and basically is an equivalent to free(). It also claims it's being used for callbacks but isn't used that way anywhere.
2008-10-18Fix const, dupes.Jelmer Vernooij1-35/+0
2008-10-18Use separate make variables for libutil and libcrypto.Jelmer Vernooij1-1/+1
2008-10-18Use shared util.c.Jelmer Vernooij1-323/+5
2008-10-18Use standard va_copy.Jelmer Vernooij1-1/+1
2008-10-13Share ndrdump implementation.Jelmer Vernooij1-7/+66
2008-09-09Add a utility function to append a DATA_BLOB to a talloc objectVolker Lendecke1-0/+26
(This used to be commit d8259cbe666d96cc468203a64fb208c02a64849f)
2008-08-15Add modules_path() to construct paths to files in MODULESDIR.Michael Adam1-0/+13
Michael (This used to be commit 5ef9da6f4f04b07804b389902862fae0fbbfed13)
2008-08-12Fix bug 5686 - libsmbclient segfaults with more than one SMBCCTX.Jeremy Allison1-4/+1
Here is a patch to allow many subsystems to be re-initialized. The only functional change I made was to remove the null context tracking, as the memory allocated here is designed to be left for the complete lifetime of the program. Freeing this early (when all smb contexts are destroyed) could crash other users of talloc. Jeremy. (This used to be commit 8c630efd25cf17aff59448ca05c1b44a41964b16)
2008-08-10Remove an unused variable, process.c has its static copyVolker Lendecke1-2/+0
(This used to be commit 59136544ec16b6ceb14a75259aedd22856832bf1)
2008-07-17util: add policy_hnd_equal().Günther Deschner1-0/+10
Guenther (This used to be commit 6aca163e898bfeeff824725bb27b2ef4f7b729f9)
2008-07-08[BUG 5580] Allow access to DFS shares via libsmbclientDerrell Lipman1-0/+5
Brian Sheehan provided a nice patch intended for the 3.0 code base. This commit applies a similar patch for the 3.3 code base. It adds a new public function to libsmbclient -- smbc_set_credentials() -- that may be called from the authentication callback when DFS referrals are in use. Derrell (This used to be commit 888f922bd0d1c84a687d404e95ae314a9dd0aee1)
2008-05-19If no node number is given, default to the current node in smbcontrolVolker Lendecke1-1/+1
(This used to be commit b4b3b6b1c6a336220c6afd68b153a769397ecded)
2008-05-09util: add strip_hostname() to strip of leading '\\'.Günther Deschner1-0/+19
Guenther (This used to be commit dbf96120d8b33e592bfd3e9df1777f1670e218be)
2008-05-05Make the namelist arg to set_namearray constVolker Lendecke1-2/+2
(This used to be commit e7ce4bce5cd7eddb14982028538e965e12ccef84)
2008-05-05Fix client authentication with -P switch in client tools (Bug 5435).Günther Deschner1-1/+48
Guenther (This used to be commit d077ef64cd1d9bbaeb936566c2c70da508de829f)
2008-04-23Fix CLEAR_IF_FIRST handling of messages.tdbVolker Lendecke1-2/+3
We now open messages.tdb even before we do the become_daemon. become_daemon() involves a fork and an immediate exit of the parent, thus the parent_is_longlived argument must be set to false in this case. The parent is not really long lived :-) (This used to be commit 4f4781c6d17fe2db34dd5945fec52a7685448aec)
2008-04-18util: add reinit_after_fork() functionStefan Metzmacher1-0/+30
metze (This used to be commit 5f6c3a4f6db68c985884cbe9401a4dbe515f756b)
2008-04-08Move is_valid_policy_hnd() out of net.Günther Deschner1-0/+8
Guenther (This used to be commit aae4d91e726ef8dcad173cdd1d6f719d94462948)
2008-03-31Patch from Nicholas Brealey <nick@brealey.org> to distinguish between WinXP ↵Gerald W. Carter1-1/+4
and WinXP64. Defines a new value for the %a variable when detecting a Windows XP 64-bit client. (This used to be commit 0c94918fb52c5345ce30490046b79f81712c30bf)
2008-01-27Adding missing calls to va_end().Tim Potter1-0/+1
Just a small commit to get a handle on this git thingy. This patch fixes some missing calls to va_end() to match various calls to va_start() and VA_COPY(). Tim. (This used to be commit ec367f307dff7948722b9ac97beb960efd91991f)
2008-01-23Fix tab_depth: it should not create an extra debug header.Michael Adam1-1/+1
In pstring removal 4ae4b23586, the behaviour of tab_depth was changed to create an extra debug header (by using the DEBUGLVL macro). This extracts the debug level check from DEBUGLVL into a macro CHECK_DEBUGLVL without the debug header creation and uses this instead of DEBUGLVL in tab_depth. Michael (This used to be commit cbc7d921fa696e6c3c5197ad9f87442ba679df82)
2008-01-19Add "split_ntfs_stream_name()" together with a torture testVolker Lendecke1-0/+90
(This used to be commit d813bd9e02d9baf916eb96c478be89f0c435e07c)
2008-01-16Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy1-0/+13
(http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
2008-01-10Move transfer_file and transfer_file_internal to a module of their own.Michael Adam1-87/+0
Also, don't auto-generate prototypes of the (two) exported functions but make a start in having handwritten prototypes in dedicated header files (not in includes.h ... :-) Michael (This used to be commit 395f29d8b768a56af20b37f185eccdc5f37b68d5)
2008-01-10Reformat some code I just touched.Michael Adam1-12/+20
Michael (This used to be commit 4ed238b1e46f7680a29ebdbfe9500d16718f9057)
2008-01-10Fix a really silly typo.Michael Adam1-1/+1
Michael (This used to be commit 7b0af7cdc97d4bbcbd73a9474871217511b92c3a)
2008-01-10Correctly abstract the transfer_file mechanism with callbacks and void ptrs.Michael Adam1-5/+23
This removes the in_fsp and out_fsp global variables hack from smbd/vfs.c. Michael (This used to be commit b2e7cdc6e899ca3c16edbb6c8786ff9aa999fa6e)