summaryrefslogtreecommitdiffstats
path: root/source3/libads
Commit message (Collapse)AuthorAgeFilesLines
* Fix denial of service - memory corruption.Jeremy Allison2011-02-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix bug #7669.Jeremy Allison2010-09-151-1/+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)
* s3-kerberos: temporary fix for ipv6 in print_kdc_line().Günther Deschner2010-05-191-5/+20
| | | | | | | | | | | | | Currently no krb5 lib supports "kdc = ipv6 address" at all, so for now just fill in just the kdc_name if we have it and let the krb5 lib figure out the appropriate ipv6 address ipv6 gurus, please check. Guenther (cherry picked from commit dd5a4e23f8c24564d3fd21bb8d01172321087362) The last 3 patches fix bug #7341 (winbind not working over IPv6).
* s3-kerberos: pass down kdc_name to create_local_private_krb5_conf_for_domain().Günther Deschner2010-05-191-7/+12
| | | | | Guenther (cherry picked from commit e3bdff3d67b46277ee59685218bd90f3788b487d)
* s3-libads: fix get_remote_printer_publishing_data after ↵Günther Deschner2010-03-111-26/+14
| | | | | | spoolss_EnumPrinterDataEx IDL change. Guenther
* s3: Prevent glibc errors: talloc()ed memory should not be SAFE_FREE()ed.Jim McDonough2009-12-071-1/+1
| | | | Fix bug #6967 (net ads join with OU fails with glibc error on free()).
* s3-kerberos: do not include authdata headers before including krb5 headers.Günther Deschner2009-12-031-0/+1
| | | | | | Guenther Part of a fix for bug #6929.
* s3-kerberos: only use krb5 headers where required.Günther Deschner2009-11-307-0/+7
| | | | | | | This seems to be the only way to deal with mixed heimdal/MIT setups during merged build. Guenther
* s3/cldap: Improve debug messages.Jeremy Allison2009-07-301-4/+11
| | | | This patch was made to debug bug #6437.
* Fix coverity #901 - uninitialized data.Jeremy Allison2009-04-231-1/+1
| | | | Jeremy.
* Add comment explaining the previous fix.Jeremy Allison2009-04-221-0/+6
| | | | Jeremy.
* Fix bug #6279 - winbindd crash. Cope with LDAP libraries returning ↵Jeremy Allison2009-04-221-0/+4
| | | | | | LDAP_SUCCESS but not returning a result. Jeremy
* s3:kerberos Rework smb_krb5_unparse_name() to take a talloc contextAndrew Bartlett2009-04-074-21/+22
| | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 574a6a8c350a4bab3f42f3f9cfb382db721d69b5)
* s3-libads: avoid NULL talloc context with ads_get_dn().Günther Deschner2009-04-071-8/+8
| | | | | Guenther (cherry picked from commit d71dec9259366e99beca69fcd9397bd38ed82c71)
* s3:libads Make ads_get_dn() take a talloc contextAndrew Bartlett2009-04-061-40/+29
| | | | | | | | | | | | | Also remove ads_memfree(), which was only ever a wrapper around SAFE_FREE, used only to free the DN from ads_get_ds(). This actually makes libgpo more consistant, as it mixed a talloc and a malloc based string on the same element. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 20501876735fc4656083747ba8aa0de9da8fb820)
* s3-krb5: Fix Coverity #762 (REVERSE_INULL).Günther Deschner2009-03-201-6/+6
| | | | | Guenther (cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)
* fix build on old Heimdal based systemsBjörn Jacke2009-03-191-5/+3
| | | | | Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 011ad7245d53a716c4c766f5ef8d317bb3a53d0f)
* s3: remove POLICY_HND.Günther Deschner2009-03-181-1/+1
| | | | | Guenther (cherry picked from commit 531af136f9dd5c6050f78948837294aed02de440)
* s3-spoolss: use rpccli_spoolss_enumprinterdataex in ldap_printer.c.Günther Deschner2009-03-181-26/+43
| | | | | Guenther (cherry picked from commit cd7f62ab70337ccee7ba652e7d9ed8d299938bff)
* Eliminate two duplicate SEC_ACE_TYPE constants already provided byJelmer Vernooij2009-03-011-4/+4
| | | | security.idl.
* s3-rpcclient: use rpccli_spoolss_openprinter_ex helper.Günther Deschner2009-02-101-5/+5
| | | | Guenther
* s3-spoolss: fix memleak in get_remote_printer_publishing_data().Günther Deschner2009-02-101-2/+8
| | | | Guenther
* s3-rpcclient: use srv_name_slash instead of formating servername again and ↵Günther Deschner2009-02-091-4/+3
| | | | | | again. Guenther
* s3-spoolss: use rpccli_spoolss_ClosePrinter.Günther Deschner2009-02-061-1/+1
| | | | Guenther
* s3: use pidl to pull a KRB5_EDATA_NTSTATUS.Günther Deschner2009-02-061-36/+6
| | | | Guenther
* s3/libads: Change "ldap ssl:ads" parameter to "ldap ssl ads".Karolin Seeger2009-02-051-1/+1
| | | | Karolin
* s3-kerberos: use KRB5_KT_KEY compat macro.Günther Deschner2009-02-031-7/+1
| | | | Guenther
* s3-kerberos: fix ads_dedicated_keytab_verify_ticket with heimdal.Günther Deschner2009-02-031-3/+10
| | | | Guenther
* Revert "fix for commit d96248a9b46 which broke Heimdal builds"Günther Deschner2009-02-031-6/+0
| | | | | | This does not build. This reverts commit af736923a541df1a37afeb72b8a5652932c4c69c.
* fix for commit d96248a9b46 which broke Heimdal buildsBjörn Jacke2009-02-021-0/+6
|
* Add two new parameters to control how we verify kerberos tickets. Removes ↵Dan Sledz2009-02-011-17/+112
| | | | | | | | | | | | | | | | | | | | | | | lp_use_kerberos_keytab parameter. The first is "kerberos method" and replaces the "use kerberos keytab" with an enum. Valid options are: secrets only - use only the secrets for ticket verification (default) system keytab - use only the system keytab for ticket verification dedicated keytab - use a dedicated keytab for ticket verification. secrets and keytab - use the secrets.tdb first, then the system keytab For existing installs: "use kerberos keytab = yes" corresponds to secrets and keytab "use kerberos keytab = no" corresponds to secrets only The major difference between "system keytab" and "dedicated keytab" is that the latter method relies on kerberos to find the correct keytab entry instead of filtering based on expected principals. The second parameter is "dedicated keytab file", which is the keytab to use when in "dedicated keytab" mode. This keytab is only used in ads_verify_ticket.
* s3: fix bug #6073: prevent ads_connect() from using SSL unless explicitly ↵Michael Adam2009-01-291-3/+5
| | | | | | | | | | | requested This fixes "net ads join". It copes with the changed default "ldap ssl = start tls". A new boolean option "ldap ssl : ads" is added to allow for explicitly requesting ssl with ads. Michael
* ads_connect: Return immediately on a failed GC connection.Gerald (Jerry) Carter2009-01-161-3/+14
| | | | | | | | | | | ads_connect_gc() feeds an explicit server to ads_connect(). However, if the resulting connection fails, the latter function was attempting to find a DC on its own and continuing the connection. This resulting in GC searches being sent over a connection using port 389 which would fail when using the base search suffix outside of the domain naming context. The fix is to fail immediately in ads_connect() since the GC lookup ordering is handled already in ads_connect_gc().
* s3:libads: use lock_path for creating paths to local krb5.conf filesMichael Adam2009-01-161-2/+3
| | | | | | | | instead of manually doing an asprintf with lp_lockdir() Michael squash
* s3:libads: give create_local_private_krb5_conf_for_domain() a common exit pointMichael Adam2009-01-161-30/+20
| | | | Michael
* Async wrapper for open_socket_out_send/recvVolker Lendecke2009-01-041-12/+19
|
* open_socket_out is always used with SOCK_STREAM, remove argument "type"Volker Lendecke2009-01-031-1/+1
|
* Replace a static variable and alarm() calls by using sys_select()Volker Lendecke2008-12-311-23/+24
| | | | Günther, please check!
* Fix some nonempty blank linesVolker Lendecke2008-12-311-5/+5
|
* Fix more "ignore return value" warnings from gcc 4.3.Jeremy Allison2008-12-301-9/+22
| | | | Jeremy
* Fix more asprintf warnings and some error path errors.Jeremy Allison2008-12-231-2/+10
| | | | Jeremy.
* More asprintf warning fixes.Jeremy Allison2008-12-233-8/+28
| | | | Jeremy.
* More asprintf warning fixes.Jeremy Allison2008-12-231-9/+18
| | | | Jeremy.
* Fix more asprintf errors and error code paths.Jeremy Allison2008-12-232-9/+31
| | | | Jeremy.
* s3:libads/ldap.c: store the dc name in the saf cache as in all other placesStefan Metzmacher2008-12-131-3/+2
| | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit 543fa85a711337e979c7b631bda5db95d109ef59)
* s3:libads/ldap.c: if the client belongs to no site at all any dc is the closestStefan Metzmacher2008-12-131-0/+5
| | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit f86ef9b53a903485deba94febf90dd4e657cc02b)
* s3:libads/ldap.c: pass the real workgroup name to get_dc_name()Stefan Metzmacher2008-12-131-1/+10
| | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit c2d4a84abe1b6cbf68d6e9f1bb1f8974d0b628fc)
* s3: libads: use get_dc_name() instead of get_sorted_dc_list() in the LDAP caseStefan Metzmacher2008-12-131-1/+25
| | | | | | | | | | | | | We use get_dc_name() for LDAP because it generates the selfwritten krb5.conf with the correct kdc addresses and sets KRB5_CONFIG. For CLDAP we need to use get_sorted_dc_list() to avoid recursion. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit d2f7f81f4d61bae9c4be65cbc1bf962b6c24a31f)
* s3: correctly detect if the current dc is the closest oneStefan Metzmacher2008-12-131-1/+0
| | | | | | | | | | ads->config.tried_closest_dc was never set. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (cherry picked from commit dfe5b00db35e1e7c7bb3ba36729fc3f97eb48db3)
* s3: Change sockaddr util function names for consistencyTim Prouty2008-12-031-3/+3
| | | | Also eliminates name conflicts with OneFS system libraries