summaryrefslogtreecommitdiffstats
path: root/source/libnet
Commit message (Collapse)AuthorAgeFilesLines
* s3-kerberos: only use krb5 headers where required.Günther Deschner2010-01-131-0/+2
| | | | | | | | This seems to be the only way to deal with mixed heimdal/MIT setups during merged build. Guenther (cherry picked from commit 60262369fc2ae19f6d9263e35b5db9b09b603a1b)
* s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().Günther Deschner2009-10-081-1/+2
| | | | | | Guenther (cherry picked from commit bea8e5fa6038d5abd2ec1e12f9005c4a04abb79f) (cherry picked from commit 864c0b58aec55e37cf304b28c762a5259fc0ec67)
* Don't require "Modify property" perms to unjoin (bug #6481) "net ads leave" ↵Jim McDonough2009-07-271-19/+42
| | | | | | | | | | | | | | | | | | | | | 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 6f9ed71a87e4ed5665ee8999ebf987e2165629c6)
* Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+Jeremy Allison2009-04-171-1/+1
| | | | | | | | What a difference a name makes... :-). Just because something is missnamed SA_RIGHT_SAM_OPEN_DOMAIN, when it should actually be SA_RIGHT_SAM_LOOKUP_DOMAIN, don't automatically use it for a security check in _samr_OpenDomain(). Jeremy. (cherry picked from commit 8a985bcfe4aee7e602601fe78a94757dce645fcc)
* s3-libnet: Fix Bug #6193: avoid messing with sync_context in ↵Günther Deschner2009-03-271-3/+0
| | | | | | | | | | | | libnet_samsync_delta(). We absolutely need to avoid messing with the sync_context as that breaks the stream of replication data coming from the DC (only replicates ~350 instead of ~4000 groups). Guenther (cherry picked from commit e3f7057b0942793543c215ab45176c4280bd7d51) (cherry picked from commit efa7f6bff9bec89214dab368ff5efc61fa1cc212)
* s3: move definition of W_ERROR_NOT_OK_GOTO_DONE down to nt_status.hMichael Adam2009-03-271-6/+0
| | | | | | | | | where all the other W_ERROR_xyz macros are found as well. Michael Signed-off-by: Michael Adam <obnox@samba.org> (cherry picked from commit 76a460aecab6d5a03af9b8b5d97cba15d364cfde)
* s3-libnet: fix coverity #848 (UNINIT).Günther Deschner2009-02-201-1/+1
| | | | | | Guenther (cherry picked from commit e9d5405948e35a8eec0b49cc6c066278cb523397) (cherry picked from commit 3d13df93f0ffaa518a576191a0715add878a7635)
* s3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege.Volker Lendecke2009-02-161-2/+5
| | | | | This used to be commit fda8abac in master. (cherry picked from commit 5994c90ff8754b64a3a6658e28bd94f6a91a441b)
* Fix coverity CID#117 - resource leak in error path.Jeremy Allison2009-02-161-24/+53
| | | | | Jeremy. (cherry picked from commit 250caa1f2f285063249b2c4a7266196938d24761)
* Fix coverity CID#116. Resource leak on error path.Jeremy Allison2009-02-161-2/+4
| | | | | Jeremy. (cherry picked from commit 8241669521772cc75a9ca278a7f9a57256907ded)
* Fix coverity CID#115. Resource leak in error path.Jeremy Allison2009-02-161-1/+4
| | | | | Jeremy. (cherry picked from commit 8e11901f92b2ecb976f0c24c5eb96fb6b8127207)
* Fix another "format not a string literal and no format arguments" warning.Jeremy Allison2009-01-021-2/+5
| | | | | Jeremy (cherry picked from commit fc04faf9668bf0176ffd8d5c20e65aa83d63021b)
* In gcc version 4.3.2 we get warnings for functions declared withJeremy Allison2009-01-021-2/+1
| | | | | | attribute warn_unused_result. Start to fix these. Jeremy. (cherry picked from commit dfd983881341bfbc811199901ae3d8fe973649c1)
* s3:libnet_join: use DS_FORCE_REDISCOVERYStefan Metzmacher2008-12-151-0/+1
| | | | | | metze (cherry picked from commit 2bb91392b46e347fe3b6803d10b10d8b40e4a4a6) (cherry picked from commit 134893ef2b12b4b039c717588a8172613f6d1955)
* s3:libnet_join: call saf_join_store() after a the join.Stefan Metzmacher2008-12-151-1/+4
| | | | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> (similar to commit feef594d275881466e2c3f59c0ff54609a9cc53b) (cherry picked from commit 6a993cb333675f4079d439fa334edee2df604933) (cherry picked from commit 8314ce63ff77f0472d4249adcea87123b3b3f5c2)
* s3-libnet: fix DEBUG statement in libnet_keytab.Günther Deschner2008-12-121-1/+1
| | | | | Guenther (cherry picked from commit 2dfeb2d5970f52e4948e22a2a4e4f47479a550dc)
* s3-libnet: fix build warning (missing prototype).Günther Deschner2008-12-121-2/+2
| | | | | Guenther (cherry picked from commit 60222a78c00ad9d1d09789024184c430bff0f68b)
* s3-libnet_samsync: print new line in display output.Günther Deschner2008-12-121-3/+3
| | | | | Guenther (cherry picked from commit 650077c22b2e67815c9a2fd8a1cc56986c0aaced)
* s3-libnetjoin: Fix bug #5749. Re-set acctflags while joining. fix from metze.Günther Deschner2008-12-081-16/+29
| | | | | Guenther (cherry picked from commit bc3a277455dd4557e796ddc0bef0f52a11f889e7)
* s3-libnetjoin: remove unused md4_trust_password, found by metze.Günther Deschner2008-12-081-5/+0
| | | | | Guenther (cherry picked from commit f479fdc29813c3452fd22c4a2780f0bc5066e664)
* s3-samr: fix init_samr_user_info{23,24} callers.Günther Deschner2008-12-081-1/+2
| | | | | Guenther (cherry picked from commit 82dfb92cae1ffc52a92ea27ba96dc875ce0ae4a1)
* s3-libnetjoin: fix build warning.Günther Deschner2008-11-261-1/+1
| | | | | Guenther (cherry picked from commit 3e529fb619384e694e01204ca305e2a13724defd)
* s3-libnetjoin: try to show a better error message upon invalid configuration.Günther Deschner2008-11-261-11/+50
| | | | | Guenther (cherry picked from commit 0e99fe1855c66e9743725d43ba92ec59f35f5b55)
* s3-netlogon: fix type of parameters string in user delta.Günther Deschner2008-11-191-3/+3
| | | | | Guenther (cherry picked from commit 0d23b13370db9d4ab0a3c81fca4a28e15802fe68)
* s3-libnet-samsync: store samsync sequence number state in keytab.Günther Deschner2008-11-191-1/+52
| | | | | Guenther (cherry picked from commit e96bcb7c2a49f95dee2a50adb1ed3ba77b1cbe07)
* s3-libnet-samsync: refactor libnet_samsync.Günther Deschner2008-11-191-57/+66
| | | | | Guenther (cherry picked from commit a5f3bbbef1cdee91562e6f497cb612be78af7dd2)
* s3-libnet-samsync: pass back sequence number from fetch_sam_entries_keytab.Günther Deschner2008-11-191-1/+16
| | | | | Guenther (cherry picked from commit 59b58d79af5aea62a6b7e60eb4b34141fd4d6356)
* s3-libnet-samsync: use netr_DatabaseDeltas unless full replication enforced.Günther Deschner2008-11-191-1/+12
| | | | | Guenther (cherry picked from commit a8fdca6963c4028ea8c65110945e78291f19031a)
* s3-libnet-samsync: pass sequence number pointer to process routine.Günther Deschner2008-11-196-0/+8
| | | | | Guenther (cherry picked from commit 7ab18764a88cb4ff555ce21b50d58a19ba47d540)
* s3-libnet-samsync: move all modules to startup,process,finish callbacks.Günther Deschner2008-11-196-71/+153
| | | | | Guenther (cherry picked from commit 1f239e17dd43667507b6b49006c9fe61c2cda289)
* s3-libnet-samsync: call init and close ops function where appropriate.Günther Deschner2008-11-191-1/+23
| | | | | Guenther (cherry picked from commit c0c5dfbe4a305e18af69f094a25062cb222b7fd1)
* s3-libnet-samsync: use samsync_ops.Günther Deschner2008-11-196-60/+34
| | | | | Guenther (cherry picked from commit 8aa7b1e4d8706bddb6da1b455f16484ca35fc17e)
* s3-libnet-samsync: add samsync_ops to all samsync modules.Günther Deschner2008-11-195-0/+21
| | | | | Guenther (cherry picked from commit eee6e2039b476c5bc257b1987335e250fd002e5c)
* s3-libnet-samsync: add samsync_ops.Günther Deschner2008-11-191-0/+18
| | | | | Guenther (cherry picked from commit 34eb55b9a8c83c739c1e3f540515e435b2b1a365)
* s3-libnet: move add_to_keytab_entries to libnet_keytab.Günther Deschner2008-11-194-87/+93
| | | | | Guenther (cherry picked from commit 919f03a1755e6865a4d0edbdc50168355c03f346)
* s3-libnet-samsync: add support for partial replication.Günther Deschner2008-11-192-12/+124
| | | | | Guenther (cherry picked from commit 8889173e7dbc7fb56e854640e60baae0c7477fa2)
* s3-libnet-samsync: use enctype 23 for vampired keytab entries.Günther Deschner2008-11-181-1/+1
| | | | | | Guenther (cherry picked from commit a48abdaa811c76e64a3383fe970e62b7bbb3582c) (cherry picked from commit 38f37ebb2478e62007e1eeb38054ad4f6949824a)
* Fix net rpc vampire, based on an *amazing* piece of debugging work by ↵Jeremy Allison2008-10-235-45/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Cooper S. Blake" <the_analogkid@yahoo.com>. "I believe I have found two bugs in the 3.2 code and one bug that carried on to the 3.3 branch. In the 3.2 code, everything is located in the utils/net_rpc_samsync.c file. What I believe is the first problem is that fetch_database() is calling samsync_fix_delta_array() with rid_crypt set to true, which means the password hashes are unencrypted from the RID encryption. However, I believe this call is redundant, and the corresponding call for samdump has rid_crypt set to false. So I think the rid_crypt param should be false in fetch_database(). If you follow the code, it makes its way to sam_account_from_delta() where the password hashes are decrypted a second time by calling sam_pwd_hash(). I believe this is what is scrambling my passwords. These methods were refactored somewhere in the 3.3 branch. Now the net_rpc_samsync.c class calls rpc_vampire_internals, which calls libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with rid_crypt always set to false. I think that's correct. But the second bug has carried through in the sam_account_from_delta() function: 208 if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) { 209 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0); 210 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED); 211 } 212 213 if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) { 214 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0); 215 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED); If you look closely you'll see that the nt hash is going into the lm_passwd variable and the decrypted value is being set in the lanman hash, and the lanman hash is being decrypted and put into the nt hash field. So the LanMan and NT hashes look like they're being put in the opposite fields." Fix this by removing the rid_crypt parameter. Jeremy. (cherry picked from commit 3690f2d87549840b5408771d2596069ff1732fc5)
* If name_to_fqdn fails, retry with the dns domain the DC gave usVolker Lendecke2008-10-151-3/+8
| | | | | | | This is a workaround for the cases where you want to join under a netbios name that is different from your hostname, i.e. a name that can not be found in /etc/hosts or dns. In these cases, name_to_fqdn fails or gives invalid results. (cherry picked from commit 16e9a454404a5a70985caf15d1b987fe6332d195)
* "gwen/cc" does not like the double const :-)Volker Lendecke2008-10-151-1/+1
| | | | (cherry picked from commit ab37affd6edec0d80109a7b635bc7fdb3b84eb6b)
* Fixed "uninitialized variable" build warningSteven Danneman2008-09-161-0/+1
| | | | | | | | | | | | With gcc 4.1.3 on Ubuntu 7.10 the following build warning occurs: Compiling libnet/libnet_samsync_keytab.c cc1: warnings being treated as errors libnet/libnet_samsync_keytab.c: In function â\200\230fetch_sam_entries_keytabâ\200\231: libnet/libnet_samsync_keytab.c:102: warning: â\200\230entry.enctypeâ\200\231 is used uninitialized in this function Fixed by initializing to ENCTYPE_NULL (cherry picked from commit 52f8463962d266d904b60919a6a40c0b76de34ef)
* libnet_join: streamline logic of libnet_join_post_processing()Michael Adam2008-09-151-9/+11
| | | | | | Michael (cherry picked from commit 81cc1af1e699e454fbb1d12636d002f845231006) (cherry picked from commit 3ea63ec10c37460253fbe68d63576e0cd8783c11)
* libnet: fix join by creating keytab after changing the config.Michael Adam2008-09-151-10/+11
| | | | | | Michael (cherry picked from commit 96d1c780bf9524b929e6026776602a5288aea73d) (cherry picked from commit 298e5b663b1d6b469d130041dbed151801a45d1e)
* kerberos: use KRB5_KT_KEY macro where appropriate.Günther Deschner2008-09-011-27/+3
| | | | | | Guenther (cherry picked from commit a042dffd7121bda3dbc9509f69fcfae06ed4cc22) (cherry picked from commit f2648a5d7e894d89802915c1a83908dde19e7c13)
* kerberos: move the KRB5_KEY* macros to header file.Günther Deschner2008-09-011-10/+0
| | | | | | Guenther (cherry picked from commit c28fa17ffffee3e6fd4897c9c6b4937388a19600) (cherry picked from commit 2b57bd45cd8cd123dabb642b81d73c313e3bdc91)
* libnetjoin: support kerberized joining/unjoing (fix #5416).Günther Deschner2008-08-111-19/+41
| | | | Guenther
* libnet samsync ldif: fix the build without LDAP.Michael Adam2008-08-081-0/+15
| | | | Michael
* Fix "might be used uninitialized" warnings.Jeremy Allison2008-08-072-3/+4
| | | | Jeremy.
* libnet_keytab: fix the build with heimdalStefan Metzmacher2008-08-041-6/+38
| | | | metze
* libnet dssync: start memory allocation cleanup: use tmp ctx in libnet_dssync().Michael Adam2008-08-011-2/+9
| | | | | | | Don't leak temporary data to callers but use a temporary context that is freed at the end. Michael