summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-07-21s3:afs make path argument to afs_syscall constChristian Ambach1-1/+1
2011-07-21s3:lib/afs use stdbool typesChristian Ambach2-22/+22
2011-07-21s3:lib/afs_settoken fix some compiler warningsChristian Ambach1-3/+4
2011-07-21s3:lib/afs fix some compiler warningsChristian Ambach1-2/+3
2011-07-21s3:lib/afs fix the build with --with-fake-kaserverChristian Ambach2-4/+13
This fixes one piece of Bug #8263
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2-4/+5
This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett2-2/+4
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-19Second part of fix for bug 8310 - toupper_ascii() is broken on big-endian ↵Jeremy Allison2-2/+2
systems. Re-add: smb_ucs2_t toupper_w(smb_ucs2_t v); and ensure it is called whenever we are operating on smb_ucs2_t variables. I'd like to make the definition of smb_ucs2_t incompatible with int and codepoint_t so they can't be mixed, but that's a patch for another time. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Jul 19 23:48:05 CEST 2011 on sn-devel-104
2011-07-19First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systemsJeremy Allison2-3/+3
Remove int toupper_ascii(int c); int tolower_ascii(int c); int isupper_ascii(int c); int islower_ascii(int c); and replace with their _m equivalents, as they are identical.
2011-07-14s3-lib Remove unused get_cmdline_auth_info_copyAndrew Bartlett1-24/+0
2011-07-12s3: dbwrap_ctdb.c: fix #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue (bug ↵Björn Baumbach1-2/+2
#8303) Check for HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL instead of CTDB_CONTROL_SCHEDULE_FOR_DELETION, which is an enum member and not a define. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jul 12 18:56:30 CEST 2011 on sn-devel-104
2011-07-12s3:lib: s/SMBkeepalive/NBSSkeepaliveStefan Metzmacher1-2/+2
metze
2011-07-08s3:libsmb: remove unused enum smb_read_errors infrastructureStefan Metzmacher1-20/+0
metze
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett1-136/+0
2011-07-08s3-lib use True and False in bitmap.cAndrew Bartlett1-7/+7
2011-07-06s3:sharesec: return an error if get_share_security() returns NULLStefan Metzmacher1-1/+1
This indicates an error, as it uses get_share_security_default() if no security descriptor is configured. Jeremy, please check. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jul 6 15:40:23 CEST 2011 on sn-devel-104
2011-07-06s3:sharesec: also initialize pgranted if get_share_security() returns NULLStefan Metzmacher1-0/+3
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jul 6 12:54:30 CEST 2011 on sn-devel-104
2011-07-06s3: Follow the TALLOC_FREE convention in source3Volker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jul 6 11:01:05 CEST 2011 on sn-devel-104
2011-07-06s3: Fix Coverity ID 2586 -- NO_EFFECTVolker Lendecke1-1/+1
tsocket_address_bsd_sockaddr returns ssize_t, and on some systems socklen_t is unsigned. So (len < 0) could never have turned true. Volker
2011-07-05s3:lib fix non-empty blank linesChristian Ambach1-3/+3
2011-07-05s3: Return "granted" from share_access_checkVolker Lendecke1-2/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-04s3-lib Move event_add_idle() to source3/lib/events.cAndrew Bartlett1-1/+81
This allows libauth not to depend on smbd_base. Andrew Bartlett
2011-07-04s3-util: Add a get_remote_hostname() function.Andreas Schneider1-0/+108
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-03s3: Make cli_cm_open return NTSTATUSVolker Lendecke1-7/+10
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Jul 3 23:57:53 CEST 2011 on sn-devel-104
2011-07-02param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()Andrew Bartlett1-4/+4
Jermey started this in 1997 with 0aa493cc0303aa4177f289b9e4c797c8fa180672 (avoiding the duplicate function makes it easier to generate the struct loadparm_globals). Andrew Bartlett
2011-07-01s3:smbldap: make smbldap_connect_system self containedGregor Beck1-6/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jul 1 12:37:50 CEST 2011 on sn-devel-104
2011-07-01s3:smbldap: add a destructor to smbldap_state, just in caseGregor Beck1-0/+7
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: let smbldap_free_struct do what it claims toGregor Beck1-2/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: free the idle event scheduled in smbldap_open in smbldap_closeGregor Beck1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: use smbldap_state as memory context for idle eventGregor Beck1-2/+2
ensure the event is canceled if the smbldap_state gets freed this fixes a panic of winbindd if verify_idpool fails Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-06-27s3:g_lock: g_lock.tdb should not be executableChristian Ambach1-1/+2
TDBs are not executable, so do not create the file with the execution bit set Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Mon Jun 27 17:09:12 CEST 2011 on sn-devel-104
2011-06-24s3-param Remove %(DomainSID) supportAndrew Bartlett1-102/+0
This also removes the now unused longvar support. This experiment never took off. Fixing this allows me to resolve the the library loop between libsmbconf and SECRETS3/passdb. Andreas correctly points out that this loop originally comes from my patch to obtain the domain sid from passdb (25cfa29e29bdbb6c84bd85ea02ec542228ae585f), but as I would prefer to keep that feature, I'm hoping to break the loop here instead. Andrew Bartlett
2011-06-23s3-param Remove 'announce version' parameterAndrew Bartlett1-2/+2
The only users I can find of this on the internet involve confused users, and our own documentation recommends never setting this. Don't confuse our users any longer. Andrew Bartlett
2011-06-21s3-smbd: longer explanation of smbd_shim codeAndrew Tridgell1-2/+7
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Jun 21 09:05:37 CEST 2011 on sn-devel-104
2011-06-21s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett3-35/+97
The become_root() and similar 'smbd' functions that are used widely in Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c. These have been replaced by a runtime plugin mechanim, which ensures that standlone binaries still do nothing, while in smbd the correct function is used. This avoids having these as duplicate symbols in the smbd binary, which can cause unpredictable behaviour. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-21lib/util: Use common d_printf() in the whole codebaseAndrew Bartlett1-128/+0
This removes the lang_tdb based varient, the only user of the lang_tdb code is SWAT, which calls that directly. 'net' and 'pam_winbind' are internationalised using gettext. Andrew Bartlett
2011-06-21lib/util Make unused d_vfprintf() staticAndrew Bartlett1-1/+1
2011-06-20Use tevent_req_oomVolker Lendecke2-3/+3
This fixes a few Coverity errors
2011-06-20source3/lib/util_tdb.c: operation timeout support for TDB2.Rusty Russell1-0/+96
TDB2 doesn't have (the racy) signal pointer; the new method is to override the locking callbacks and do the timeout internally. The technique here is to invalidate the struct flock when the timeout occurs, so it works even if it happens before we enter the fcntl() call. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: Higher level API fixes.Rusty Russell8-11/+11
My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: use tdb_open_compat.Rusty Russell1-6/+11
This is a helper for the common case of opening a tdb with a logging function, but it doesn't do all the work, since TDB1 and TDB2's log functions are different types. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: tdb_parse_record() returns negative errors, not -1.Rusty Russell2-3/+3
Fixup callers to tdb_parse_record() to be compatible with tdb2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.Rusty Russell1-2/+10
We don't expose freelist or hash size for TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.Rusty Russell2-1/+10
These don't exist in tdb2. The former is used in one weird place in tdb1, and the latter not at all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_compat: use tdb_errorstr_compat()Rusty Russell1-6/+6
Since TDB2 functions return the error directly, tdb_errorstr() taken an error code, not the tdb as it does in TDB1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_traverse/tdb_traverse_read: check returns for negative, not -1.Rusty Russell3-4/+4
TDB2 returns a negative error number on failure. This is compatible if we always check for < 0 instead of == -1. Also, there's no tdb_traverse_read in TDB2: we don't try to make traverse reliable any more, so there are no write locks anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_chainunlock: ignore return value.Rusty Russell2-8/+2
TDB2 returns void here. tdb_chainunlock will *always* return with the chain unlocked, but it will complain via the log function if it wasn't locked. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_chainlock: check returns for 0, not -1.Rusty Russell2-3/+3
TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_transaction_cancel: ignore return value.Rusty Russell3-18/+9
TDB2 returns void here. tdb_transaction_cancel will *always* return with the transaction cancelled, but it will complain via the log function if a transaction wasn't in progress. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_transaction_commit: check returns for 0, not -1.Rusty Russell2-5/+5
TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>