summaryrefslogtreecommitdiffstats
path: root/source3/rpc_client
Commit message (Collapse)AuthorAgeFilesLines
* Fix a silly memset typo.Tim Potter2002-10-211-2/+2
| | | | | Change a int* to a uint32* in the cli_spoolss_enum_ports() function. (This used to be commit 4663d79d3e9dcfef49f7cef1f6205efe58edbdc1)
* Zero tallocated memory in decode_printer_info, decode_driver_info,Tim Potter2002-10-211-0/+10
| | | | | decode_port_info and decode_printerdriver functions. (This used to be commit bf2d9dd5ba2ecc7e0e1bd17049adee6dd80d807c)
* Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is outTim Potter2002-10-171-2/+3
| | | | | of range instead of silently failing. (This used to be commit b5111f47b5cf1820550e17663f983674b67bcaff)
* merge from APP_HEADGerald Carter2002-10-081-0/+16
| | | | | | | | | | * s/driverlocation/comment * detect native mode domain and enumerate local groups Also * Added sendfile stats from SAMBA_2_2 (This used to be commit 764b58e2c0b3179cffe157c0ab58761b156b8423)
* merge native_mode flag in winbindd_domain struct from app-headGerald Carter2002-10-041-31/+11
| | | | (This used to be commit dd948a302ad6bd4307ecdfb10510e12185150eae)
* merge of working dsrolegetprimdominfo() client code from APP_HEADGerald Carter2002-10-042-1/+64
| | | | (This used to be commit f70caa25e4ee198151b915cf2bc0a26b2d0e243d)
* merge of new client side support the Win2k LSARPC UUID in rpcbindGerald Carter2002-10-042-30/+79
| | | | | from APP_HEAD (This used to be commit 38c9e4299845fd77cc8629945ce2d259489f7437)
* change notify merge from APP_HEADGerald Carter2002-09-101-0/+3
| | | | (This used to be commit b5227f0a645fdf2358fcb880f22e4662efdfe8e3)
* Return WERR_UNKNOWN_LEVEL for unknown info levels.Tim Potter2002-09-091-3/+12
| | | | (This used to be commit d30da51956accfc4ea4662cece00d4df223421cd)
* Return WERR_UNKNOWN_LEVEL for getprinterdriver level 6 as we don'tTim Potter2002-09-091-0/+3
| | | | | know how to decode a printer driver into a DRIVER_INFO_6 structure. (This used to be commit 1338f623c2a1e539ee9ee5fedbaf16baf3eb171e)
* cli_spoolss_enumprinterdrivers:Tim Potter2002-09-061-0/+4
| | | | | Return WERR_UNKNOWN_LEVEL if we can't decode the returned buffer. (This used to be commit 0379a32d825e036c7f0dcabef46547cd678a2a1d)
* Conver cli_spoolss routines to use REGISTRY_VALUE and REGVAL_CTR code. Nice ↵Tim Potter2002-09-031-67/+34
| | | | | | | one jerry! (Hey I thought I checked this in already?) (This used to be commit f0c6303bebe0f494d70ac5371d7f6727413fe482)
* Change JOB_INFO_CTR to return a pointer to an array rather than array of ↵Tim Potter2002-09-031-4/+47
| | | | | | | pointers. Implemented client function for deleteprinterdataex. (This used to be commit f7641c8fd1079c2ef444d4bca5b97b1285733d10)
* Return data from enumprinterdataex by deep copying on passed in tdb context.Tim Potter2002-09-031-1/+17
| | | | (This used to be commit 1f629aa54ea3733c356c21f9f707b7f6075f6429)
* Implemented some more client side spoolss functions:Tim Potter2002-09-021-1/+162
| | | | | | | - getprinterdataex(), setprinterdataex(), enumprinterdataex() Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ (This used to be commit 62a60782533851b3380aa0db300fa16dfe6ca72e)
* added cli_net_auth_3 client code.Jean-François Micouleau2002-08-301-13/+96
| | | | | | | | | | | changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch. pass also the negociation flags all the way. all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient. in the future we will be able to call auth_2 or auth_3 as we want. J.F. (This used to be commit 4d38caca40f98d0584fefb9d66424a3db5b5789e)
* Don't try to convert enumprinters name to a unc name.Tim Potter2002-08-271-11/+1
| | | | (This used to be commit e09007dd5d17d5f84aea3c2fed16ce79ba7be1f2)
* Pass the object name down to the enum_printers rpc. By default this is theTim Potter2002-08-271-2/+8
| | | | | server name and everything works as advertised. See the MSDN doco for details. (This used to be commit d6b10fe9691bfc96d5933c029990c60fd292bdc9)
* Moved calculation of secure channel type into a new function.Tim Potter2002-08-231-0/+18
| | | | (This used to be commit b8dba26978c281259e02b9d6ebacaa7cba4f7787)
* added a 'net rpc samdump' command for dumping the whole sam viaAndrew Tridgell2002-08-221-13/+12
| | | | | samsync operations (as a BDC) (This used to be commit e4cb106d2e3e6a41529369545a7a6ce5fe6d8986)
* The "max data count" value in SMB transacts indicates how much the other end canShirish Kalele2002-08-201-1/+1
| | | | | | | send us. As it stands, we incorrectly set it to the number of bytes we are sending. Correcting this by setting a static value of 1024 (This could even be something larger). Improves RPC client performance. (This used to be commit b0bd42c9466f41dc87a11fd6065620f93c8ebc40)
* Add lsa 0x2e (queryinfo2) client sideJim McDonough2002-08-121-0/+86
| | | | (This used to be commit c3b05b21a0340d8ff02a79401399e3d43d9e759a)
* Add client side support for samr connect4 (0x3e). Seems to have oneJim McDonough2002-08-121-0/+47
| | | | | | additional parm compared to samr connect, but I've only seen 0x00000002 in that field... (This used to be commit ed2370b91f7f6a36efdf6b65340a5b29a26e7e7a)
* Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD.Tim Potter2002-08-081-0/+44
| | | | (This used to be commit fe43c2ac2d2e1dd3b3a25c807d4dd379c5ac4960)
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm (This used to be commit e358d7b24c86a46d8c361b9e32a25d4f71a6dc00)
* Moved rpc client routines from libsmb back to rpc_client where they belong.Tim Potter2002-08-0210-3467/+5931
| | | | (This used to be commit cb946b5dadf3cfd21bf584437c6a8e9425f6d5a7)
* Proper merge of all the working printing stuff from APPLIANCE_HEAD.Jeremy Allison2002-06-281-451/+0
| | | | | | Now let's keep this in sync ! Jeremy. (This used to be commit 3603cd4947df2c10df604447dc542932cb9e5d5a)
* more debug classess activatedSimo Sorce2002-06-188-0/+25
| | | | (This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
* Add user name to netsessenum RPC to stop 1783 messagesJim McDonough2002-06-031-5/+6
| | | | (This used to be commit 18854bcd2df88ab49c263c86d111a50d83411885)
* More cleanup work preparing for SMB signing.Jeremy Allison2002-06-011-1/+1
| | | | | Jeremy. (This used to be commit 3c05f7c06fc8c45307ea75128b160a5945fc5197)
* Cleaned up srvsvc constants a bit.Tim Potter2002-05-291-8/+8
| | | | (This used to be commit ca61f68d5ca8791bea34732bd358cfb63273fc5c)
* Remove unused files.Andrew Bartlett2002-05-183-800/+0
| | | | | | | The size of samba going down for once :-) Andrew Bartlett (This used to be commit 00ef4aad88f4ba9f2e242578c37933eac001c351)
* WERROR merge from SAMBA_2_2Gerald Carter2002-04-111-34/+18
| | | | (This used to be commit 32dc5dbbfb16cb9fd6f953dbb8148f5228b453a4)
* Renamed get_nt_error_msg() to nt_errstr().Tim Potter2002-03-177-51/+51
| | | | (This used to be commit 1f007d3ed41c1b71a89fa6be7d173e67e927c302)
* syncing up printing code with SAMBA_2_2 (already done some mergesGerald Carter2002-03-151-80/+251
| | | | | | | | | | | | | | in the reverse). * add in new printer change notify code from SAMBA_2_2 * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex() * sync up the _print_queue_struct in smb.h (why did someone change the user/file names in fs_user/fs_file (or vice-versa) ? ) * sync up some cli_spoolss_XXX functions (This used to be commit 5760315c1de4033fdc22684c940f18010010924f)
* merge from 2.2Gerald Carter2002-02-131-2/+2
| | | | (This used to be commit 50fa21c995d33601920b3b56a3e03b09262e7fd9)
* Removed version number from file header.Tim Potter2002-01-3011-22/+11
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Add prs_dump_before to dump everything from the start of the prsMartin Pool2002-01-021-1/+1
| | | | | | buffer up to the current position, and use this to dump pipe buffers just before parsing. (This used to be commit 92a3ab274e6cf09a8ba39b91f8bbacba6de40b37)
* Also capture received dataMartin Pool2002-01-021-0/+5
| | | | (This used to be commit 93fadcd1118b390605d2504bee63a1e8b6373ac5)
* struct cli_state remembers the pipe name that it's talking to, if any,Martin Pool2002-01-021-3/+22
| | | | | | | | so that we can print it in later debug messages. Call prs_dump to dump out requests sent by the client at sufficiently high debug levels. (This used to be commit 9973b22b34dc2a88a20b821d4e69f39d2a6aa6a3)
* A farily large commit:Andrew Bartlett2002-01-011-152/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move rpc_client/cli_trust.c to smbd/change_trust_pw.c - It hasn't been used by anything else since smbpasswd lost its -j - Add a TALLOC_CTX to the auth subsytem. These are only valid for the length of the calls to the individual modules, if you want a longer context hide it in your private data. Similarly, all returns (like the server_info) should still be malloced. - Move the 'ntdomain' module (security=domain in oldspeak) over to use the new libsmb domain logon code. Also rework much of the code to use some better helper functions for the connection - getting us much better error returns (the new code is NTSTATUS). The only remaining thing to do is to figure out if tpot's 0xdead 0xbeef for the LUID feilds is sufficient, or if we should do random LUIDs as per the old code. Similarly, I'll move winbind over to this when I get a chance. This leaves the SPOOLSS code and some cli_pipe code as the only stuff still in rpc_client, at least as far as smbd is concerned. While I've given this a basic rundown, any testing is as always appriciated. Andrew Bartlett (This used to be commit d870edce76ecca259230fbdbdacd0c86793b4837)
* added internal sasl/gssapi code. This means we are no longer dependent on ↵Andrew Tridgell2001-12-081-1/+1
| | | | | | cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm (This used to be commit 435fdf276a79c2a517adcd7726933aeef3fa924b)
* OK. Smbpasswd -j is DEAD.Andrew Bartlett2001-12-053-232/+43
| | | | | | | | | | | | | | | | | | | | This moves the rest of the functionality into the 'net rpc join' code. Futhermore, this moves that entire area over to the libsmb codebase, rather than the crufty old rpc_client stuff. I have also fixed up the smbpasswd -a -m bug in the process. We also have a new 'net rpc changetrustpw' that can be called from a cron-job to regularly change the trust account password, for sites that run winbind but not smbd. With a little more work, we can kill rpc_client from smbd entirly! (It is mostly the domain auth stuff - which I can rework - and the spoolss stuff that sombody else will need to look over). Andrew Bartlett (This used to be commit 575897e879fc175ba702adf245384033342c903d)
* I think the lookup_pdc_name() should be called lookup_dc_name() and theTim Potter2001-11-291-1/+1
| | | | | | | | | name_status_find() call here should look up a #1c name instead of #1d. This fixes some bugs currently with BDC authentication in winbindd and in smbd as you can't query the #1d name with the ip address of a BDC. Who is Uncle Tom Cobbley anyway? (This used to be commit 4215048f7b20a8f9e5877bdbb2f54841b2f7fa64)
* This is another rather major change to the samba authenticaionAndrew Bartlett2001-11-241-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subystem. The particular aim is to modularized the interface - so that we can have arbitrary password back-ends. This code adds one such back-end, a 'winbind' module to authenticate against the winbind_auth_crap functionality. While fully-functional this code is mainly useful as a demonstration, because we don't get back the info3 as we would for direct ntdomain authentication. This commit introduced the new 'auth methods' parameter, in the spirit of the 'auth order' discussed on the lists. It is renamed because not all the methods may be consulted, even if previous methods fail - they may not have a suitable challenge for example. Also, we have a 'local' authentication method, for old-style 'unix if plaintext, sam if encrypted' authentication and a 'guest' module to handle guest logins in a single place. While this current design is not ideal, I feel that it does provide a better infrastructure than the current design, and can be built upon. The following parameters have changed: - use rhosts = This has been replaced by the 'rhosts' authentication method, and can be specified like 'auth methods = guest rhosts' - hosts equiv = This needs both this parameter and an 'auth methods' entry to be effective. (auth methods = guest hostsequiv ....) - plaintext to smbpasswd = This is replaced by specifying 'sam' rather than 'local' in the auth methods. The security = parameter is unchanged, and now provides defaults for the 'auth methods' parameter. The available auth methods are: guest rhosts hostsequiv sam (passdb direct hash access) unix (PAM, crypt() etc) local (the combination of the above, based on encryption) smbserver (old security=server) ntdomain (old security=domain) winbind (use winbind to cache DC connections) Assistance in testing, or the production of new and interesting authentication modules is always appreciated. Andrew Bartlett (This used to be commit 8d31eae52a9757739711dbb82035a4dfe6b40c99)
* I *love* removing code :-). Removed 4 files that weren't being used.Jeremy Allison2001-11-165-1979/+10
| | | | | | | All this stuff was being pulled in due to *one* unneeded call to fetch a domain SID which smbpasswd already puts in the database... Jeremy. (This used to be commit 6bf2505cce7db770fd4db5b19999a78588e96b58)
* Removed duplicate debug.Tim Potter2001-11-051-2/+0
| | | | (This used to be commit 5c3521c937f9ba3c4c586495f54dc69a664c392a)
* Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison2001-11-033-14/+11
| | | | | | Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy. (This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)
* This is a farily large patch (3300 lines) and reworks most of the AuthRewriteAndrew Bartlett2001-10-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code. In particular this assists tpot in some of his work, becouse it provides the connection between the authenticaion and the vuid generation. Major Changes: - Fully malloc'ed structures. - Massive rework of the code so that all structures are made and destroyed using malloc and free, rather than hanging around on the stack. - SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them to be declared 'invalid' without the chance that people might get ROOT by default. - kill off some of the "DOMAIN\user" lookups. These can be readded at a more appropriate place (probably domain_client_validate.c) in the future. They don't belong in session setups. - Massive introduction of DATA_BLOB structures, particularly for passwords. - Use NTLMSSP flags to tell the backend what its getting, rather than magic lenghths. - Fix winbind back up again, but tpot is redoing this soon anyway. - Abstract much of the work in srv_netlog_nt back into auth helper functions. This is a LARGE change, and any assistance is testing it is appriciated. Domain logons are still broken (as far as I can tell) but other functionality seems intact. Needs testing with a wide variety of MS clients. Andrew Bartlett (This used to be commit f70fb819b2f57bd57232b51808345e2319d52f6c)
* Don't accidentally return success when sending a broken NET_SAMLOGONTim Potter2001-10-311-0/+1
| | | | | | request. This exposes a domain authentication bug with win2k where a rpc fault is returned but not propagated up as an error. (This used to be commit 27cd7ac85779bbc1e9488ee06e87b0c743c5b29c)