summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix denial of service - memory corruption.Jeremy Allison2011-02-286-3/+47
| | | | | | | | | | | | | | | | | | | | | | | CVE-2011-0719 Fix bug #7949 (DoS in Winbind and smbd with many file descriptors open). All current released versions of Samba are vulnerable to a denial of service caused by memory corruption. Range checks on file descriptors being used in the FD_SET macro were not present allowing stack corruption. This can cause the Samba code to crash or to loop attempting to select on a bad file descriptor set. A connection to a file share, or a local account is needed to exploit this problem, either authenticated or unauthenticated (guest connection). Currently we do not believe this flaw is exploitable beyond a crash or causing the code to loop, but on the advice of our security reviewers we are releasing fixes in case an exploit is discovered at a later date. (cherry picked from commit 43babef991feedbe2acb77d27254d302ab107fa8)
* s3:lib/netapi: don't set SAMR_FIELD_FULL_NAME if we just want to set the ↵Stefan Metzmacher2011-01-081-3/+0
| | | | | | | | | | | account name (bug #7896) metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Dec 30 18:09:13 CET 2010 on sn-devel-104 (cherry picked from commit f1d15ea54c313e71fc032b2ed191bdecad868858) (cherry picked from commit c6a0971b3790253a906b370562237479d273bb94)
* v3-4-test: Pull in tevent_req_poll_ntstatus from masterVolker Lendecke2010-12-261-0/+11
|
* Fix bug #7669.Jeremy Allison2010-09-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Fix bug #7669 (buffer overflow in sid_parse() in Samba3 and dom_sid_parse in Samba4). CVE-2010-3069: =========== Description =========== All current released versions of Samba are vulnerable to a buffer overrun vulnerability. The sid_parse() function (and related dom_sid_parse() function in the source4 code) do not correctly check their input lengths when reading a binary representation of a Windows SID (Security ID). This allows a malicious client to send a sid that can overflow the stack variable that is being used to store the SID in the Samba smbd server. A connection to a file share is needed to exploit this vulnerability, either authenticated or unauthenticated (guest connection). (cherry picked from commit df20a300758bc12286820e31fcf573bdfc2147bc)
* Fix bug 7590 - offline login fails because winbind deletes cache on every ↵Jeremy Allison2010-08-161-1/+1
| | | | | | | | | | | | startup. Sync lib/tdb_validate.c with the change in current master. Change tdb_validate_open() to always use O_RDWR instead of O_RDONLY, as (from the bug report): "db_check() will always return failure for a read-only database. Silently, without any log output, when _tdb_lockall() fails." Jeremy. (cherry picked from commit 39cb903463d8a3fcabd9e148112bf5cf81744130)
* s3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in ↵Günther Deschner2010-06-091-1/+1
| | | | | | | | | | | | netdomjoin-gui. Patch from Buchan Milne <bgmilne@mandriva.org>. Thanks! Guenther (cherry picked from commit 575b1018c65312e9eab562cf4851524cf2f8f24a) (cherry picked from commit 1419c154d67b8ffaf0d6e2e3ba103121ab3736f5)
* s3:lib/time: remove TIME_T_MIN/MAX definesBjörn Jacke2010-04-121-8/+0
| | | | | | | we already get them from lib/util/time.h (cherry picked from commit f5729dbb6e720cb6076ea053f1ad0680259e6b39) The last two patches address bug #7352 (TIME_T_MAX defines inconsistent).
* Revert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail ↵Karolin Seeger2010-03-091-61/+4
| | | | | | | | | to respond to a read or write." This reverts commit c81c109a6ce83741bb5149a51ceb4ab30855e9f9. This fixes bug #7222 (All users have full rigths on all shares)(CVE-2010-0728). (cherry picked from commit 49fc62cc5d8bcb2ef246fa6505c99071b406c413)
* Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to ↵Jeremy Allison2010-02-041-4/+61
| | | | | | | | | | respond to a read or write. Only works on Linux kernels 2.6.26 and above. Grants CAP_KILL capability to allow Linux threads under different euids to send signals to each other. Jeremy. (cherry picked from commit 899bd0005f56dcc1e95c3988d41ab3f628bb15db)
* s3:smbldap: add smbldap_talloc_first_attribute()Stefan Metzmacher2010-01-191-0/+34
| | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c992127f8a96c37940a6d298c7c6859c47f83d9b) (cherry picked from commit 915b7552b71904baf6a452bdc1649e76d8286a14)
* s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.Günther Deschner2009-11-301-0/+35
| | | | | Guenther (cherry picked from commit f8016cfee922cba97b70f56c752827e4584da6c6)
* s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.Günther Deschner2009-11-301-0/+30
| | | | | Guenther (cherry picked from commit fcee9d2c97a673347baf58f749f35785a896e468)
* s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901)Michael Adam2009-11-231-4/+5
| | | | Michael
* s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901)Michael Adam2009-11-231-4/+5
| | | | Michael
* s3:lib/select: don't overwrite errno in the signal handlerStefan Metzmacher2009-10-081-0/+4
| | | | | metze (cherry picked from commit 00e378f17c39c52689601bc622b9cd78a0cdce12)
* s3: BSD needs sys/sysctl.h included to build properlyBjörn Jacke2009-09-191-0/+5
| | | | | | | | FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use sysctlbyname(). Thanks to Timur Bakeyev for that. Fix bug #6728.
* Fix bug 6707 - 3.4.1 segfault in parsing configs.Marc Aurele La France2009-09-151-4/+4
| | | | | Fixes an occasional segfault caused by an out-of-bounds reference in config file parsing. (cherry picked from commit 7c00227f00a83345035c4c0a6716b46864f2da8d)
* Fix bug 6529 - Offline files conflict with Vista and Office 2003. Jeremy.Jeremy Allison2009-09-151-2/+39
|
* Fix bug 6673 - smbpasswd does not work with "unix password sync = yes". ↵Jeremy Allison2009-09-091-17/+25
| | | | Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed from sys_read() to sys_recv(). read_socket_with_timeout() is called with non-fd's (with a pty in chgpasswd.c and with a disk file in lib/dbwrap_file.c via read_data()). recv works for the disk file, but not the pty. Change the name of read_socket_with_timeout() to read_fd_with_timeout() to make this clear (and add comments). Jeremy.
* Update copies of config.guess and config.sub. (cherry picked from commit ↵Jelmer Vernooij2009-09-092-76/+282
| | | | 6230eb94af2305f479db3b76479a0dc841c3d1d5)
* make smbcontrol smbd ping work proper checking for arguments handle short ↵Olaf Flebbe2009-08-311-6/+16
| | | | | | | | pid_t correctly Fixes bug #6655. (cherry picked from commit 5359e397ff190c35414f6961be61a5110e237dd5)
* s3/smbldap: Fix typo in debug message.Karolin Seeger2009-08-061-1/+1
| | | | | Karolin (cherry picked from commit 54dffbea663ecf4542d6c5e30da6e346d5d60424)
* Increase the max_grp value to 128 (AIX NGROUPS_MAX value) instead of 32 to ↵Yannick Bergeron2009-08-031-1/+1
| | | | | | allow AIX to call sys_getgrouplist only once (cherry picked from commit c3e12444f57e24dcd6c9259537ed0489db4658e9)
* s3/util_sock: Make open_udp_socket() IPv6 clean.Jeremy Allison2009-07-181-10/+25
| | | | This addresses bug #6437.
* Revert "[s3]pidfile_create: use check is_default_dyn_CONFIGFILE() since we ↵Michael Adam2009-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | have it." This reverts commit 1d3dcd1e420104c23769b691d0b8b7958d5c58a7. This fixes Bug #6531 (Pid File creation.) Usually, I would extend is_default_dyn_XYZ() so that it returns true when dyn_XYZ has not been set yet or when its value is equal to the compiled in default value XZY. But this would have a change in effect in popt_common and torture.c: is_default_dyn_CONFIGFILE() is used there to check whether the config file should be overwritten by the contents of the environment variable SMB_CONF_PATH. Currently this is only done when set_dyn_CONFIGFILE() had _not_ previously been called at all, not even with the same value as the compiled in default. Michael (cherry picked from commit 914a14b3a9c9d922d2a5c1aa413945afa11cfd2a) Signed-off-by: Michael Adam <obnox@samba.org>
* s3:util: let parent_dirname() correctly return toplevel filenamesStefan Metzmacher2009-07-031-1/+1
| | | | | | | | | metze (cherry picked from commit a14efbadd53ac9678d75e6029f947d63cfa0c4e5) Signed-off-by: Stefan Metzmacher <metze@samba.org> This addresses bug #6526.
* Don't require "Modify property" perms to unjoin bug #6481) "net ads leave" ↵Jim McDonough2009-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | stopped working when "modify properties" permissions were not granted (meaning you had to be allowed to disable the account that you were about to delete). Libnetapi should not delete machine accounts, as this does not happen on win32. The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag really means "disable" (both in practice and docs). However, to keep the functionality in "net ads leave", we will still try to do the delete. If this fails, we try to do the disable. Additionally, it is possible in windows to not disable or delete the account, but just tell the local machine that it is no longer in the account. libnet can now do this as well. Don't use ads realm name for non-ads case. #6481 Also check that the connection to ads worked.
* Fix bug 6514: net gives unhelpful "lp_load failed" when it's missing smb.confDavid Markey2009-06-291-1/+1
| | | | (cherry picked from commit 55ed0be65f07b46d51a647e556644039d68a002d)
* Fix bug 4699: Remove pidfile on clean shutdownVolker Lendecke2009-06-191-8/+18
| | | | (cherry picked from commit 5a9ca3db032af5938e9709f3355a1f45b1e08d27)
* s3-netapi: Fix Bug #6305. Correctly prompt for a password when a username ↵Günther Deschner2009-06-171-1/+5
| | | | | | | | | | was given. When no callback or wrapping has managed to get a password, prompt in the netapi connection manager for a password. Guenther (cherry picked from commit 33be1f56f778116a5657b257ffb0f1eb7196658a)
* s3-netapi: Fix Bug #6451: net/libnetapi user rename using wrong access bits.Günther Deschner2009-06-171-0/+2
| | | | | Guenther (cherry picked from commit 29b8e08b83eeb0ab7d33bf46981cdbad8c35dc9b)
* s3: correct check for usleep value boundariesBjörn Jacke2009-06-051-1/+1
| | | | (cherry picked from commit 7cdad30b9640cc876e8ca59cd67455039107a5df)
* s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen2009-05-271-6/+6
| | | | | | | | | | When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3-privileges: add privilege_delete_account().Günther Deschner2009-05-181-0/+28
| | | | | Guenther (cherry picked from commit dccecdf33850ec4d763b8b0e7ba7be7a8eb873de)
* s3-privileges: remove trailing whitespace from privileges codes.Günther Deschner2009-05-182-105/+105
| | | | | Guenther (cherry picked from commit 118f343b05ba86a1f8fd28394433aa6e961e2d6c)
* s3-netdomjoin-gui: allow to switch between workgroups/domains with the same ↵Günther Deschner2009-05-181-2/+4
| | | | | | | name. Guenther (cherry picked from commit d800ee50335ecbd2dbd3b451a18a00780ac28f04)
* s3-netdomjoin-gui: cosmetic fix for empty hostnames.Günther Deschner2009-05-181-0/+1
| | | | | Guenther (cherry picked from commit 8c74d31962eb82f7dcc07000aeb27a84a633a225)
* s3-netdomjoin-gui: only gray out labels when not root and not connecting toGünther Deschner2009-05-181-3/+3
| | | | | | | remote machines. Guenther (cherry picked from commit 473bf41d20b25bd7d98ea6647e6295b3fb6f34e1)
* Fix bug 5681: Do not limit the number of network interfacesVolker Lendecke2009-05-183-22/+39
| | | | | | | | | | Jeremy as far as I can see there is no real technical reason to limit the number of interfaces. If you like this patch, can you please merge it to 3.4? If you don't please tell me :-) Thanks, Volker
* s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.Günther Deschner2009-05-151-2/+49
| | | | | Guenther (cherry picked from commit 8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568)
* s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.Günther Deschner2009-05-153-1/+183
| | | | | Guenther (cherry picked from commit 80f0d819fb85bdfbd85e910fccc62e778bea3a83)
* s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.Günther Deschner2009-05-151-0/+36
| | | | | Guenther (cherry picked from commit 1ddc4829aec61d952aaf3185cc56d53d4a9b5c3c)
* s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.Günther Deschner2009-05-153-0/+163
| | | | | Guenther (cherry picked from commit 8fd3c8902c5e953a0ddf184b08f9e37f954ee12e)
* s3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to ↵Günther Deschner2009-05-131-1/+48
| | | | | | | | | rename computers in domains. Guenther (cherry picked from commit 6154b031f4521fad4b5c460643da59dd918b240a)
* s3-netdomjoin-gui: Fix join prompt dialog test.Günther Deschner2009-05-131-1/+1
| | | | | Guenther (cherry picked from commit d3a9ee689d636f13f7935d1ddfccfdd4f4e8527a)
* s3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.Günther Deschner2009-05-131-2/+7
| | | | | Guenther (cherry picked from commit 3e2975b3bdd247d1e3e7c74bada2f85a1936acaf)
* s3-netdomjoin-gui: inspect the correct computername string beforeGünther Deschner2009-05-131-1/+1
| | | | | | | enabling/disabling the change button. Guenther (cherry picked from commit 20b5fc02d2e97dbd51d84cc05ac887e274b14866)
* Fix bug 6157Volker Lendecke2009-05-121-0/+56
| | | | | This patch picks the alphabetically smallest one of the multi-value attribute "uid". This fixes a regression against 3.0 and also becomes deterministic.
* Add checks for non_root mode to help buildfarm spoolss tests.Jeremy Allison2009-05-111-14/+18
| | | | | Reviewed by Guenther. Jeremy.
* Do not crash in ctdbd_traverse if ctdbd is not aroundVolker Lendecke2009-05-041-0/+5
|