summaryrefslogtreecommitdiff
path: root/source4/lib/util.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r12286: handle absolute path and url in lock_path() as in private_path()Stefan Metzmacher1-0/+6
metze (This used to be commit 35d76f733793aecb89d82ce30a8cecb7371d3e95)
2007-10-10r12285: move the smbd.tmp into piddir, --with-fhs piddir is differentStefan Metzmacher1-1/+24
from lockdir and they are typically set to piddir=/var/run/samba and lockdir=/var/lib/samba, and we should keep the temporary stuff under /var/run/samba metze (This used to be commit 571a870618cf595930da3057b147058489c8a37b)
2007-10-10r10438: Move portability functions to lib/replace/; replace now simply ensuresJelmer Vernooij1-19/+1
that a given set of (working) POSIX functions are available (without prefixes to their names, etc). See lib/replace/README for a list. Functions that behave different from their POSIX specification (such as sys_select, sys_read, etc) have kept the sys_ prefix. (This used to be commit 29919a71059b29fa27a49b1f5b84bb8881de65fc)
2007-10-10r10315: Remove use of fstring and pstring in dynconfig.cJelmer Vernooij1-12/+0
Remove unused includes of dynconfig.h (This used to be commit 59083b7ba60d518ddb59646c4fd69938afd079b3)
2007-10-10r9791: r11611@blu: tridge | 2005-08-30 21:48:22 +1000Andrew Tridgell1-1/+1
recognise any case combination of 'localhost' as 127.0.0.1 (This used to be commit 1d8dae5167a1a08b69274fc17e6e010174420ab5)
2007-10-10r8703: cope with null string in interpret_addr()Andrew Tridgell1-1/+1
(This used to be commit ff156f7aae29045edd898635d16d141b3e848f3f)
2007-10-10r8579: recognise the name 'localhost' as 127.0.0.1. This solves a problemAndrew Tridgell1-0/+5
with some hosts that are missing localhost from /etc/hosts (This used to be commit f9866258e099001390aa61dcc12055fe1374db60)
2007-10-10r7912: make private_path() recognise a non-relative filename, so we can haveAndrew Tridgell1-1/+7
sam database = sam.ldb and it will know to put it in the private dir, but if you use sam database = ldap://server it knows to use it as-is (This used to be commit c5bccbc366db144d3e1cb7b21f0e3284d841dd06)
2007-10-10r7850: Support mkdir() with just one parameter. Patch fromJelmer Vernooij1-1/+2
Steven Edwards <steven_ed4153@yahoo.com>. I've moved the Win32-specific tests to win32.m4 so it does not make any of the POSIX configure stuff more complicated. (This used to be commit bf85fdd01552f75b745fdf3159a7a87cd6521ed2)
2007-10-10r7597: removed the bogus get_myfullname() and get_mydomname() calls, and putAndrew Tridgell1-56/+0
them in the ntlmssp code, which is the only place they are used. Andrew, please remove them completely once you have some more reliable way to get this info they are bogus as gethostname() may give us a short hostname (and does on lot of systems), so the calls often give totally the wrong result anyway (This used to be commit 35ec292f86bf663618b4bd03133d9bbd6e2faf10)
2007-10-10r5308: trimmed back a lot of the old macros from smb_macros.hAndrew Tridgell1-4/+2
(This used to be commit bf43c9bdcf9e654d123f6a2b29feb9189ca9e561)
2007-10-10r5302: fixed a compilation problem on solaris caused by the recent includeAndrew Tridgell1-17/+14
changes (This used to be commit e7e015f79b10c353848a17f31c91a0593790a560)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-0/+1
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5297: ensure pstring is not in the generated prototypesAndrew Tridgell1-1/+1
(This used to be commit b4103d9f2b809408572521f385d4e7a5ba412169)
2007-10-10r4682: A LDB-based secrets implementation in Samba4.Andrew Bartlett1-0/+15
This uses LDB (a local secrets.ldb and the global samdb) to fill out the secrets from an LSA perspective. Some small changes to come, but the bulk of the work is now done. A re-provision is required after this change. Andrew Bartlett (This used to be commit ded33033521a6a1c7ea80758c5c5aeeebb182a51)
2007-10-10r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()Andrew Tridgell1-25/+0
(This used to be commit b0f6e21481745d1b2ced28d9ed6f09f6ffd99562)
2007-10-10r4052: fixed a bunch of code to use the type safe _p allocation macrosAndrew Tridgell1-0/+17
(This used to be commit 80d15fa3402a9d1183467463f6b21c0b674bc442)
2007-10-10r3965: fix compiler warningsStefan Metzmacher1-3/+1
metze (This used to be commit 0614fa3b168265e69a611936dd7c1f7a078e53dd)
2007-10-10r3581: fix some signedness warnings with gcc-4.0Stefan Metzmacher1-2/+1
(there some callers to be fixed later) metze (This used to be commit dfb062c63c5445023055045ba40979eb58f1740e)
2007-10-10r3494: got rid of include/rewrite.h, and split out the dynconfig.h headerAndrew Tridgell1-0/+1
(This used to be commit 558de54ec6432a4ae90aa14a585f32c6cd03ced2)
2007-10-10r3457: s_addr is a macro on solaris, so we can't use it in structure names. ↵Andrew Tridgell1-4/+4
arrgh. (This used to be commit 7842b23d01c53009259a2461600bd01159cecebf)
2007-10-10r3449: more include file reductionAndrew Tridgell1-0/+1
the ldb part isn't ideal, I will have to think of a better solution (This used to be commit 6b1f86aea8427a8e957b1aeb0ec2f507297f07cb)
2007-10-10r3443: the next stage in the include files re-organisation.Andrew Tridgell1-7/+8
I have created the include/system/ directory, which will contain the wrappers for the system includes for logical subsystems. So far I have created include/system/kerberos.h and include/system/network.h, which contain all the system includes for kerberos code and networking code. These are the included in subsystems that need kerberos or networking respectively. Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C file, instead each C module includes the include/system/XXX.h file for the logical system support it needs, and the details are kept isolated in include/system/ This patch also creates a "struct ipv4_addr" which replaces "struct in_addr" in our code. That avoids every C file needing to import all the system networking headers. (This used to be commit 2e25c71853f8996f73755277e448e7d670810349)
2007-10-10r3441: some include file cleanups and general housekeepingAndrew Tridgell1-21/+21
(This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699)
2007-10-10r3360: improved the deletion of tmp files. smbd now puts all tmp files in ↵Andrew Tridgell1-1/+24
var/locks/smbd.tmp/ and deletes that dir on startup. (This used to be commit 7e942e7f1bd2c293a0e6648df43a96f8b8a2a295)
2007-10-10r3357: removed the need to use TDB_CLEAR_IF_FIRST in Samba4.Andrew Tridgell1-6/+9
We found a few months ago that TDB_CLEAR_IF_FIRST is extremely inefficient for large numbers of connections, due to a fundamental limitation in the way posix byte range locking is implemented. Rather than the nasty workaround we had for Samba3, we now have a single "cleanup tmp files" function that runs when smbd starts. That deletes the tmp tdbs, so TDB_CLEAR_IF_FIRST is not needed at all. (This used to be commit ffa285bc783c775a2d53a58fb691ca339e6c76ae)
2007-10-10r3278: - rewrote the client side rpc connection code to use lib/socket/Andrew Tridgell1-13/+11
rather than doing everything itself. This greatly simplifies the code, although I really don't like the socket_recv() interface (it always allocates memory for you, which means an extra memcpy in this code) - fixed several bugs in the socket_ipv4.c code, in particular client side code used a non-blocking connect but didn't handle EINPROGRESS, so it had no chance of working. Also fixed the error codes, using map_nt_error_from_unix() - cleaned up and expanded map_nt_error_from_unix() - changed interpret_addr2() to not take a mem_ctx. It makes absolutely no sense to allocate a fixed size 4 byte structure like this. Dozens of places in the code were also using interpret_addr2() incorrectly (precisely because the allocation made no sense) (This used to be commit 7f2c771b0e0e98c5c9e5cf662592d64d34ff1205)
2007-10-10r3004: removed some unused functionsAndrew Tridgell1-120/+0
(This used to be commit 247421ee648d1935b68a47195fe1709bb861a7d5)
2007-10-10r2900: rusty pointed out to me that discard_const() can be done via a macroAndrew Tridgell1-22/+0
on systems that have the intptr_t type, and for systems that don't have it, they also almost certainly won't have -Wcast-qual, so we can use a void* cast. (This used to be commit 2132d38f9c5ba59825558d5ba084a514ebc2626b)
2007-10-10r2783: got rid of the unused remote architecture detection codeAndrew Tridgell1-40/+0
(This used to be commit 9a04664531601b8251dbf6a0922ab48e675adb90)
2007-10-10r2634: use discard_const_p() in a few placesAndrew Tridgell1-2/+5
(This used to be commit 56ecda2178e33508c55c6195ccec41c06e099d6f)
2007-10-10r2632: a new approach to handling const errors. We have had huge numbers ofAndrew Tridgell1-0/+20
const warnings for a long time, and no real way to approach a solution. Some of them are unavoidable due to the way the C standard works (for example, any function that provides strchr() like functionality _must_ produce a const warning) I will be converting a bunch of places that currently produce const warnings to use the discard_const_p(). Some of these will be unavoidable const problems, some of them will be ones we will fix up over time. At least this change means we will no longer be swamped with const warnings, and we will easily be able to see when new problems emerge. (This used to be commit fec3288ad6ce58e8273e3f16e88037db49ecf046)
2007-10-10r2514: Remove unused funcions, and add static.Andrew Bartlett1-55/+1
Andrew Bartlett (This used to be commit fd10c9dd536bde497829aaed9e0ba2d51ffe2315)
2007-10-10r1596: Fix up copyrights.Jim McDonough1-1/+1
(This used to be commit d2553aac0a75591026b9b1fcf46065e5b03ed19c)
2007-10-10r1434: Merge this function in from Samba 3.0, but use a mem_ctx rather thanAndrew Bartlett1-0/+17
an fstring. Andrew Bartlett (This used to be commit e8de8905b2f328395d71afdd73c77301c9366a66)
2007-10-10r1308: move smb_panic() to lib/fault.cStefan Metzmacher1-24/+0
merge the backtrace stuff from 3.0 metze (This used to be commit 4daf1bafc71cc8f13188aeb85d81aa7513d57d95)
2007-10-10r1291: rename struct smbsrv_context to smbsrv_connectionStefan Metzmacher1-1/+1
because this is the connection state per transport layer (tcp) connection I also moved the substructs directly into smbsrv_connection, because they don't need a struct name and we should allway pass the complete smbsrv_connection struct into functions metze (This used to be commit 60f823f201fcedf5473008e8453a6351e73a92c7)
2007-10-10r1277: rename struct server_context to smbsrv_ontextStefan Metzmacher1-1/+1
because I need server_context fot the generic server infastructure metze (This used to be commit 0712f9f30797e65362c99423c0cf158a2f539000)
2007-10-10r1163: Add const.Andrew Bartlett1-1/+1
Andrew Bartlett (This used to be commit 4a445fce7fcc09049b97bcde61fa5ed1a945757d)
2007-10-10r1123: Make all lp_ string functions return 'const char *'.Andrew Bartlett1-1/+1
Fix other 'const' warnings in the torture code. Andrew Bartlett (This used to be commit 5d39d7497f189da15d659b3f83b7314026040a15)
2007-10-10r962: convert 'unsigned' and 'unsigned int' to uint_tStefan Metzmacher1-1/+1
metze (This used to be commit 57151e80eb1090281401930c8fe25b20a8cf3a38)
2007-10-10r961: convert 'uchar' to 'uint8_t'Stefan Metzmacher1-1/+1
metze (This used to be commit 9f914e4af99e18b469d4cf9d8b1514a2bd28ddec)
2007-10-10r960: convert 'unsigned int' to uint_t in the most placesStefan Metzmacher1-1/+1
metze (This used to be commit 18062d2ed9fc9224c43143c10efbf2f6f1f5bbe0)
2007-10-10r943: change samba4 to use 'uint8_t' instead of 'unsigned char'Stefan Metzmacher1-2/+2
metze (This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
2007-10-10r884: convert samba4 to use [u]int32_t instead of [u]int32Stefan Metzmacher1-6/+6
metze (This used to be commit 0e5517d937a2eb7cf707991d1c7498c1ab456095)
2004-02-18remove unused NISPLUS/AUTOMOUNT stuffStefan Metzmacher1-31/+0
metze (This used to be commit cbfa29549e5b302f947c7f2ca14fbea257e46c33)
2003-12-13added a basic dcerpc endpoint mapper to Samba4. Currently onlyAndrew Tridgell1-0/+14
implements the epm_Lookup() call, I'll add the other important calls soon. I was rather pleased to find that epm_Lookup() worked first time, which is particularly surprising given its complexity. This required quite a bit of new infrastructure: * a generic way of handling dcerpc policy handles in the rpc server * added type checked varients of talloc. These are much less error prone. I'd like to move to using these for nearly all uses of talloc. * added more dcerpc fault handling code, and translation from NTSTATUS to a dcerpc fault code * added data_blob_talloc_zero() for allocating an initially zero blob * added a endpoint enumeration hook in the dcerpc endpoint server operations (This used to be commit 3f85f9b782dc17417baf1ca557fcae22f5b6a83a)
2003-11-26signed DCERPC over TCP now works !Andrew Tridgell1-0/+11
* moved ntlmssp code into libcli/auth/, and updated to latest ntlmssp code from samba3 (thanks Andrew! the new interface is great) * added signing/ntlmssp support in the dcerpc code * added a dcerpc_auth.c module for the various dcerpc auth mechanisms (This used to be commit c18c9b5585a3e5f7868562820c14f7cb529cdbcd)
2003-11-24 * fixed byte order in epmapper parsingAndrew Tridgell1-1/+1
* allow rpc transport to be specified on command line in smbtorture (This used to be commit 8a82050fd6f45bcdb31c2c365eaed5fc12599e4f)
2003-08-13first public release of samba4 codeAndrew Tridgell1-0/+1000
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)