summaryrefslogtreecommitdiffstats
path: root/source3/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix denial of service - memory corruption.Jeremy Allison2011-02-276-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.
* s3:lib/netapi: don't set SAMR_FIELD_FULL_NAME if we just want to set the ↵Stefan Metzmacher2011-01-131-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) (cherry picked from commit b46ec13a9a548cf1bc4ada47751f9e6945306bc7)
* v3-4-test: Pull in tevent_req_poll_ntstatus from masterVolker Lendecke2011-01-131-0/+11
| | | | (cherry picked from commit 9b79de1553cfa57d24d1ac0316b814933ef3d33d)
* Fix bug 7590 - offline login fails because winbind deletes cache on every ↵Jeremy Allison2011-01-131-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) (cherry picked from commit 9812b1a601c9ccc2a3e6c06b98c32730a32c787a)
* s3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in ↵Günther Deschner2011-01-131-1/+1
| | | | | | | | | | | | | netdomjoin-gui. Patch from Buchan Milne <bgmilne@mandriva.org>. Thanks! Guenther (cherry picked from commit 575b1018c65312e9eab562cf4851524cf2f8f24a) (cherry picked from commit 1419c154d67b8ffaf0d6e2e3ba103121ab3736f5) (cherry picked from commit 5fbf50d351bf3d14b495a5aa586b0cee68ab0cae)
* Fix bug #7669.Jeremy Allison2010-09-091-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).
* s3:lib/time: remove TIME_T_MIN/MAX definesBjörn Jacke2010-05-061-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). (cherry picked from commit be86206167acb55bee2722c48a5ea09535cf2b99)
* Revert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail ↵samba-3.4.7Karolin Seeger2010-03-081-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).
* Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to ↵Jeremy Allison2010-02-151-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) (cherry picked from commit 246eba3b807e5ce50ee838c51823a9eb44f6b690)
* s3:smbldap: add smbldap_talloc_first_attribute()Stefan Metzmacher2010-02-151-0/+34
| | | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c992127f8a96c37940a6d298c7c6859c47f83d9b) (cherry picked from commit 915b7552b71904baf6a452bdc1649e76d8286a14) (cherry picked from commit 6402321d5bbbb28b335787856b16c3d8556e8e0a)
* s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.Günther Deschner2009-12-231-0/+35
| | | | | | Guenther (cherry picked from commit f8016cfee922cba97b70f56c752827e4584da6c6) (cherry picked from commit 560b7a45ff8257b7d9994199218edfa3ea4e8dae)
* s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.Günther Deschner2009-12-231-0/+30
| | | | | | Guenther (cherry picked from commit fcee9d2c97a673347baf58f749f35785a896e468) (cherry picked from commit 20b43200885d7e4cef5e26ad249c9a4c6529dca5)
* s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901)Michael Adam2009-12-231-4/+5
| | | | | Michael (cherry picked from commit d96bc12a8634d50c0c74f583c264cf8f89e22637)
* s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901)Michael Adam2009-12-231-4/+5
| | | | | Michael (cherry picked from commit d3db4b2d3a56975b0170714828921e0871bfa4a2)
* s3:lib/select: don't overwrite errno in the signal handlerStefan Metzmacher2009-10-201-0/+4
| | | | | | metze (cherry picked from commit 00e378f17c39c52689601bc622b9cd78a0cdce12) (cherry picked from commit 8d8bcfbfbe95f1623870b54cfc9329187a06d526)
* s3: BSD needs sys/sysctl.h included to build properlyBjörn Jacke2009-10-201-0/+5
| | | | | | | | | FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use sysctlbyname(). Thanks to Timur Bakeyev for that. Fix bug #6728. (cherry picked from commit 9c86a96af381f2826456f91eb99073c9fca633de)
* Fix bug 6707 - 3.4.1 segfault in parsing configs.Marc Aurele La France2009-10-201-4/+4
| | | | | | Fixes an occasional segfault caused by an out-of-bounds reference in config file parsing. (cherry picked from commit 7c00227f00a83345035c4c0a6716b46864f2da8d) (cherry picked from commit 0241ba8ce2b6da049fb3cc512508a9e9c5732781)
* Fix bug 6529 - Offline files conflict with Vista and Office 2003. Jeremy.Jeremy Allison2009-10-201-2/+39
| | | | (cherry picked from commit e971428f137dcb42e8b735386d79f1b3a6effe34)
* 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. (cherry picked from commit 91a5b8561e2f13f77fa5648f7cc373aff1701954)
* Update copies of config.guess and config.sub. (cherry picked from commit ↵Jelmer Vernooij2009-09-092-76/+282
| | | | | | 6230eb94af2305f479db3b76479a0dc841c3d1d5) (cherry picked from commit c20026a9afe1527f6442e8eedf669d199d8cdb26)
* make smbcontrol smbd ping work proper checking for arguments handle short ↵Olaf Flebbe2009-09-011-6/+16
| | | | | | | | | pid_t correctly Fixes bug #6655. (cherry picked from commit 5359e397ff190c35414f6961be61a5110e237dd5) (cherry picked from commit 86c1dbb473323ef9480cb57584be9e02363e80af)
* s3/smbldap: Fix typo in debug message.Karolin Seeger2009-08-131-1/+1
| | | | | | Karolin (cherry picked from commit 54dffbea663ecf4542d6c5e30da6e346d5d60424) (cherry picked from commit bddd55fa8a20a7a2d6d521ec951d13f548950b26)
* Increase the max_grp value to 128 (AIX NGROUPS_MAX value) instead of 32 to ↵Yannick Bergeron2009-08-131-1/+1
| | | | | | | allow AIX to call sys_getgrouplist only once (cherry picked from commit c3e12444f57e24dcd6c9259537ed0489db4658e9) (cherry picked from commit 2666b3e27444ffcad3afc21e276f189ac238433f)
* s3/util_sock: Make open_udp_socket() IPv6 clean.Jeremy Allison2009-08-131-10/+25
| | | | | This addresses bug #6437. (cherry picked from commit 27ddbcab378892dee0b69e8ba0ef03674e6e7075)
* 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> (cherry picked from commit 09411113d8f6b2389b3763bad24bcfdb61b0508c)
* 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. (cherry picked from commit 8446843ec43cd61e548dda7032f26020240d872d)
* 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. (cherry picked from commit 75eacdd7e0faa72775c4a143193edd594bd99ee7)
* 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) (cherry picked from commit 36791e2d05f05282ac4eaab17541aa857e48d830)
* Fix bug 4699: Remove pidfile on clean shutdownVolker Lendecke2009-06-191-8/+18
| | | | | (cherry picked from commit 5a9ca3db032af5938e9709f3355a1f45b1e08d27) (cherry picked from commit 9424e91ecdcf2e5dbdd06e9d97693dd193608324)
* 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) (cherry picked from commit 601520bf618555d7ef04f5586956b53a37594bff)
* 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) (cherry picked from commit dc4b6a14b64c9ab38490527fa6b248ba29ec4a73)
* s3: correct check for usleep value boundariesBjörn Jacke2009-06-111-1/+1
| | | | | (cherry picked from commit 7cdad30b9640cc876e8ca59cd67455039107a5df) (cherry picked from commit 2e14ccc5c6be9dd7e7b98dc60c89d54ba3772344)
* s3: Allow child processes to exit gracefully if we are out of fdsMarc VanHeyningen2009-05-291-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> (cherry picked from commit 1c8f9892010ce8cc754089b25313c6bc8e622165)
* s3-privileges: add privilege_delete_account().Günther Deschner2009-05-261-0/+28
| | | | | | Guenther (cherry picked from commit dccecdf33850ec4d763b8b0e7ba7be7a8eb873de) (cherry picked from commit e3be289df092f3b16bdd06904cd543920e3da307)
* s3-privileges: remove trailing whitespace from privileges codes.Günther Deschner2009-05-262-105/+105
| | | | | | Guenther (cherry picked from commit 118f343b05ba86a1f8fd28394433aa6e961e2d6c) (cherry picked from commit 0f6e4c62c97e983a99ff2c917b0c7f2db3ca289b)
* s3-netdomjoin-gui: allow to switch between workgroups/domains with the same ↵Günther Deschner2009-05-261-2/+4
| | | | | | | | name. Guenther (cherry picked from commit d800ee50335ecbd2dbd3b451a18a00780ac28f04) (cherry picked from commit 9db1fc45786872d938939bd33b3b867ee599c9a2)
* s3-netdomjoin-gui: cosmetic fix for empty hostnames.Günther Deschner2009-05-261-0/+1
| | | | | | Guenther (cherry picked from commit 8c74d31962eb82f7dcc07000aeb27a84a633a225) (cherry picked from commit c03287c2f8d03363a26b0518b6370ddfaa7b5915)
* s3-netdomjoin-gui: only gray out labels when not root and not connecting toGünther Deschner2009-05-261-3/+3
| | | | | | | | remote machines. Guenther (cherry picked from commit 473bf41d20b25bd7d98ea6647e6295b3fb6f34e1) (cherry picked from commit 7115126d0f7d97c3633b62e76e2fdc681dedb36d)
* Fix bug 5681: Do not limit the number of network interfacesVolker Lendecke2009-05-263-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 (cherry picked from commit 71e835942522992c08267da74d480ad6552c6508)
* s3-netapi: implement NetShutdownInit_r and NetShutdownAbort_r.Günther Deschner2009-05-261-2/+49
| | | | | | Guenther (cherry picked from commit 8fdb499497f8d4f4a1ca93ffc94de8b57c2c1568) (cherry picked from commit efaf83fadea2e7b13441d08d82a3a1d27571d16d)
* s3-netapi: add example code for NetShutdownInit and NetShutdownAbort.Günther Deschner2009-05-263-1/+183
| | | | | | Guenther (cherry picked from commit 80f0d819fb85bdfbd85e910fccc62e778bea3a83) (cherry picked from commit de33ca38880aa10fbd57ce45f2defdf83c379879)
* s3-netapi: add NetShutdownInit and NetShutdownAbort to public API.Günther Deschner2009-05-261-0/+36
| | | | | | Guenther (cherry picked from commit 1ddc4829aec61d952aaf3185cc56d53d4a9b5c3c) (cherry picked from commit afca1d6cd2a184d7b8f70847db143761d5497ac6)
* s3-netapi: add NetShutdownInit and NetShutdownAbort skeletons.Günther Deschner2009-05-263-0/+163
| | | | | | Guenther (cherry picked from commit 8fd3c8902c5e953a0ddf184b08f9e37f954ee12e) (cherry picked from commit fb8cbd7f7e078754faf7fb0b9f071aecbb19d401)
* s3-netdomjoin-gui: prepare to call out for NetRenameMachineInDomain() to ↵Günther Deschner2009-05-261-1/+48
| | | | | | | | | | rename computers in domains. Guenther (cherry picked from commit 6154b031f4521fad4b5c460643da59dd918b240a) (cherry picked from commit a53f9e695bd09b166085d8c714f323ff1d0ce1c6)
* s3-netdomjoin-gui: Fix join prompt dialog test.Günther Deschner2009-05-261-1/+1
| | | | | | Guenther (cherry picked from commit d3a9ee689d636f13f7935d1ddfccfdd4f4e8527a) (cherry picked from commit 7533e32075ac8b162c230ed112974f421e0d1569)
* s3-netdomjoin-gui: use NetServerGetInfo() level 101 to get hostname.Günther Deschner2009-05-261-2/+7
| | | | | | Guenther (cherry picked from commit 3e2975b3bdd247d1e3e7c74bada2f85a1936acaf) (cherry picked from commit 4298e296f02a4df182d5d2ee2623bc869b321c53)
* s3-netdomjoin-gui: inspect the correct computername string beforeGünther Deschner2009-05-261-1/+1
| | | | | | | | enabling/disabling the change button. Guenther (cherry picked from commit 20b5fc02d2e97dbd51d84cc05ac887e274b14866) (cherry picked from commit c7ca84fd4a4c58771b47252248b00e6bb5c411a1)
* Fix bug 6157Volker Lendecke2009-05-261-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. (cherry picked from commit b1d864d1006aab53a1692175adf2c64897eeffd9)
* Add checks for non_root mode to help buildfarm spoolss tests.Jeremy Allison2009-05-261-14/+18
| | | | | | Reviewed by Guenther. Jeremy. (cherry picked from commit 11041fe1c24575c25d3ac82e61d9fb2b651db3aa)
* Do not crash in ctdbd_traverse if ctdbd is not aroundVolker Lendecke2009-05-261-0/+5
| | | | (cherry picked from commit 7ad42cc74322a1435c9cce9b286b13cd9b490ec6)