summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
AgeCommit message (Collapse)AuthorFilesLines
2010-04-26s3: remove unused rap.h.Günther Deschner1-1/+0
Guenther
2010-03-10s3: Fix a long-standing problem with recycled PIDsVolker Lendecke1-0/+1
When a samba server process dies hard, it has no chance to clean up its entries in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb. For locking.tdb and brlock.tdb Samba is robust by checking every time we read an entry from the database if the corresponding process still exists. If it does not exist anymore, the entry is deleted. This is not 100% failsafe though: On systems with a limited PID space there is a non-zero chance that between the smbd's death and the fresh access, the PID is recycled by another long-running process. This renders all files that had been locked by the killed smbd potentially unusable until the new process also dies. This patch is supposed to fix the problem the following way: Every process ID in every database is augmented by a random 64-bit number that is stored in a serverid.tdb. Whenever we need to check if a process still exists we know its PID and the 64-bit number. We look up the PID in serverid.tdb and compare the 64-bit number. If it's the same, the process still is a valid smbd holding the lock. If it is different, a new smbd has taken over. I believe this is safe against an smbd that has died hard and the PID has been taken over by a non-samba process. This process would not have registered itself with a fresh 64-bit number in serverid.tdb, so the old one still exists in serverid.tdb. We protect against this case by the parent smbd taking care of deregistering PIDs from serverid.tdb and the fact that serverid.tdb is CLEAR_IF_FIRST. CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not work when all smbds are restarted. For this, "net serverid wipe" has to be run before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up sessionid.tdb and connections.tdb. While there, this also cleans up overloading connections.tdb with all the process entries just for messaging_send_all(). Volker
2010-03-03s3: build sddl.c in samba3Michael Adam1-0/+1
2010-02-14s3-includes: enable TYPESAFE_QSORT() in s3Andrew Tridgell1-0/+1
2009-12-22s3:ntlmssp: only include ntlmssp.h where actually neededAndrew Bartlett1-1/+3
Andrew Bartlett
2009-11-27s3-kerberos: do not include authdata headers before including krb5 headers.Günther Deschner1-1/+0
Guenther
2009-11-27s3-kerberos: only use krb5 headers where required.Günther Deschner1-169/+1
This seems to be the only way to deal with mixed heimdal/MIT setups during merged build. Guenther
2009-11-26s3-rpc: Avoid including every pipe's client and server stubs everywhere in ↵Günther Deschner1-1/+0
samba. Guenther
2009-11-12s3-kerberos: add smb_krb5_principal_get_realm().Günther Deschner1-0/+2
Guenther
2009-11-06Revert "s3-kerberos: add smb_krb5_parse_name_flags()."Günther Deschner1-4/+1
This reverts commit 17ef153b68795fec681f9ce17c198236aba2b1c2.
2009-11-06s3-kerberos: modify cli_krb5_get_ticket to take a new impersonate_princ_s arg.Günther Deschner1-2/+5
Guenther
2009-11-06s3-kerberos: add smb_krb5_get_{creds,credentials} incl. support for S4U2SELF ↵Günther Deschner1-1/+11
impersonation. Guenther
2009-11-06s3-kerberos: add smb_krb5_parse_name_flags().Günther Deschner1-1/+4
Guenther
2009-10-09Fix builds with external tallocSimo Sorce1-1/+1
Make sure we do not reference our internal talloc directly. Let configure define what talloc.h file to use so that builds that use an extrenal talloc do not include 2 different versions of the talloc header.
2009-10-01s3: add perfcount idl and generated files.Günther Deschner1-2/+1
Guenther
2009-09-17spnego: share spnego_parse.Günther Deschner1-1/+0
Guenther
2009-09-15libcli:nbt put util_net.c protos in new header fileAndrew Bartlett1-0/+1
This fixed a very odd build problem due to util.h importing system/network.h being imported before the uid_wapper code. Andrew Bartlett
2009-09-11s3-schannel: use NL_AUTH_SIGNATURE for schannel sign & seal (client & server).Günther Deschner1-0/+1
Guenther
2009-08-24Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison1-0/+6
Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
2009-08-16s3: Add talloc_dict.[ch]Volker Lendecke1-0/+1
2009-08-06Fix bug #5714 - NetBSD, ENODATA undefined, at least some releases.Jeremy Allison1-0/+4
Jeremy.
2009-08-06define uwrap_enabled() on Samba3Andrew Tridgell1-0/+3
s3 doesn't use uwrap yet, but it uses some common coe in lib/, and so needs a dummy version of the uwrap_enabled() macro
2009-07-08The migration to struct stat_ex broke the calculation ofJeremy Allison1-0/+2
create time from the existing timestamps (for systems that need to do this). Once the write time is changed via a sticky write, the create time might need to be recalculated. To do this I needed to add a bool into struct stat_ex to remember if the st_ex_btime field was calculated, or read from the OS. Also fixed the returning of modified write timestamps in the return from NTCreateX, SMBattr and SMBattrE (which weren't taking into account the modified timestamp stored in the open file table). Attempting to fix an issue with Excel 2003 and offline files. Volker and Metze, please review. Jeremy
2009-07-03do not redefine _INT32Matt Kraai1-2/+4
2009-06-27Add tstream_read_packetVolker Lendecke1-0/+1
2009-06-08Set SIGRTMIN to NSIGTimur I. Bakeyev1-1/+1
In the includes we define SIGRTMIN to 32 if it's not defined already. This value could be fairly low and it's better to use NSIG(number of defined signals) as the lower mark for the available signals. We have similar defenition in the source3/smbd/aio.c, which can be safely removed, as it comes from includes.h then. With regards, Timur Bakeyev. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-06Add some samba-style tldap utility functionsVolker Lendecke1-0/+1
2009-06-06Add the early start of an async ldap libraryVolker Lendecke1-0/+1
There's a lot of things this does not do yet: For example it does not parse the reply blob in the sasl bind, it does not do anything with controls yet, a lot of the ldap requests are not covered yet. But it provides a basis for me to play with a pdb_ads passdb module.
2009-05-27Gna, how long do I program in C now??? :-)Volker Lendecke1-2/+2
2009-05-26Attempt to fix the build on HP/UXVolker Lendecke1-0/+10
2009-05-26Attempt to fix the build on NetBSDVolker Lendecke1-0/+3
2009-05-26Revert "s3: fix build on systems with struct stat member st_flags"Björn Jacke1-3/+0
for a cleaner and more complete patch that Volker has in the queue :-)
2009-05-26s3: fix build on systems with struct stat member st_flagsBjörn Jacke1-0/+3
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-7/+26
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-04-21Move the security_descriptor utility code to the top-level.Jelmer Vernooij1-0/+1
2009-04-20Move some libgpo files to root.Jelmer Vernooij1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-10Link in the threads functions, not yet used.Jeremy Allison1-0/+2
Jeremy.
2009-04-08Remove async_reqVolker Lendecke1-1/+0
2009-04-07s3:kerberos Rework smb_krb5_unparse_name() to take a talloc contextAndrew Bartlett1-3/+4
Signed-off-by: Günther Deschner <gd@samba.org>
2009-03-23s3:libsmb: add a much simplified smb_siging infrastructureStefan Metzmacher1-0/+1
It's the job of the caller to maintain the seqnum/mid mapping. Hopefully we can use this code in s4 later too. metze
2009-03-18s3-spoolss: remove include/rpc_spoolss.h.Günther Deschner1-1/+0
Guenther
2009-03-03lib/util: remove samba specific talloc_get_type_abort()Stefan Metzmacher1-4/+0
metze
2009-03-01Use shared header file for character sets, remove old definitions from ↵Jelmer Vernooij1-1/+1
samba3 smb.h.
2009-03-01Add header files for secace and secacl.Jelmer Vernooij1-0/+2
2009-03-01Keep using Samba3's charset.h for now.Jelmer Vernooij1-1/+1
2009-03-01Sync smb_iconv_t type, convert_string return type with Samba 3 equivalents.Jelmer Vernooij1-1/+1
2009-02-26Add tevent_req helpers to includes.hVolker Lendecke1-0/+2
2009-02-24s3: remove unused smb_ldap.hStefan Metzmacher1-2/+0
metze
2009-02-23prefer gssapi header files from subdirectoryBjörn Jacke1-3/+3
this fixes some compile time noise on FreeBSD 7
2009-02-18S3: Allow SMBD processes to survive in low memory condidtionstodd stecher1-0/+4
This commit adds a configure argument which allows for setting MADV_PROTECT in the madvise() API. With this enabled the kernel won't kill SMBD when it's running low on memory.