summaryrefslogtreecommitdiffstats
path: root/source/rpc_client
Commit message (Collapse)AuthorAgeFilesLines
* Renamed get_nt_error_msg() to nt_errstr().Tim Potter2002-03-177-51/+51
|
* 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
* merge from 2.2Gerald Carter2002-02-131-2/+2
|
* Removed version number from file header.Tim Potter2002-01-3011-22/+11
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* 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.
* Also capture received dataMartin Pool2002-01-021-0/+5
|
* 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.
* 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
* 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
* 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
* 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 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
* 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.
* Removed duplicate debug.Tim Potter2001-11-051-2/+0
|
* 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 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
* 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.
* Fixed typo in debug message.Tim Potter2001-10-301-1/+1
|
* the next step in the intl changeover. This should get us compiling agian,Andrew Tridgell2001-10-146-24/+0
| | | | | | | and also completes the switch to lang_tdb.c. SWAT should now work with a po file in the lib/ directory also removed useless SYSLOG defines in many files
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-0215-41/+0
|
* Converted cli_net_auth2() and cli_nt_setup_creds() to return NTSTATUS.Tim Potter2001-09-183-15/+23
|
* move to SAFE_FREE()Simo Sorce2001-09-175-32/+13
|
* Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c whereAndrew Bartlett2001-09-161-1/+5
| | | | | | | | | they can have general effect. Fixed up workstaion support in the rest of samba, so that we can do these checks. Pass through the workstation for cli_net_logon(), if supplied.
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-044-51/+54
| | | | the client code still needs some work
* converted another bunch of stuff to NTSTATUSAndrew Tridgell2001-08-275-37/+37
|
* More status32 conversions.Tim Potter2001-08-242-15/+14
|
* Fixed typo in debug message.Tim Potter2001-08-241-1/+1
|
* Set secure channel type depending on server role.Tim Potter2001-08-241-1/+2
|
* This patch does a number of things, mostly smaller than they look :-)Andrew Bartlett2001-08-121-10/+8
| | | | | | | | | | | | | | | In particuar, it moves the domain_client_validate stuff out of auth_domain.c to somwhere where they (I hope) they can be shared with winbind better. (This may need some work) The main purpose of this patch was however to improve some of the internal documentation and to correctly place become_root()/unbecome_root() calls within the code. Finally this patch moves some more of auth.c into other files, auth_unix.c in this case. Andrew Bartlett
* Use new client error api.Tim Potter2001-08-101-12/+13
|
* Use the new client error api.Tim Potter2001-08-101-2/+4
|
* Removed nt_error field from cli_state as it was not used anywhere.Tim Potter2001-08-101-7/+1
|
* This is my 'Authentication Rewrite' version 1.01, mostly as submitted toAndrew Bartlett2001-08-031-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | samba-technical a few weeks ago. The idea here is to standardize the checking of user names and passwords, thereby ensuring that all authtentications pass the same standards. The interface currently implemented in as nt_status = check_password(user_info, server_info) where user_info contains (mostly) the authentication data, and server_info contains things like the user-id they got, and their resolved user name. The current ugliness with the way the structures are created will be killed the next revision, when they will be created and malloced by creator functions. This patch also includes the first implementation of NTLMv2 in HEAD, but which needs some more testing. We also add a hack to allow plaintext passwords to be compared with smbpasswd, not the system password database. Finally, this patch probably reintroduces the PAM accounts bug we had in 2.2.0, I'll fix that once this hits the tree. (I've just finished testing it on a wide variety of platforms, so I want to get this patch in).
* Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.Tim Potter2001-07-252-21/+21
| | | | | | According to the incorruptible judges find and grep, the latter won. Mmm - procrastination. (-:
* This fixes security=domain, which has been broke since the big charsetAndrew Bartlett2001-07-101-9/+2
| | | | | | | | | | | | | | | | | | | changeover. For my own sainity I have created a new function to fill out both the header and buffer for a string in an RPC struct. This DOES NOT take a length argument, only the actual string to be placed. The RPC code is currently littered with code that does init_uni_hdr() followed immidiatly by init_unistr2(), and often the length argument is wrong. (It was for the code I changed, even before the charset stuff). Another bug where we made strings AT LEAST MAX_UNICODE_LEN long hid this bug. This works for loopback connections to Samba, and can't be any more broke than it was before :-). (We had double and revese conversions, fun...). In particular this makes us multibyte complient. In any case, if there are no objections I will slowly convert other bits of code to the same system.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-044-22/+16
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Use a logical cli_read(), removed the cli_read_one() hack.Jeremy Allison2001-06-291-2/+2
| | | | Jeremy.
* Use cli_read_one() for reading DCE/RPC reply fragments. We need to checkTim Potter2001-06-221-29/+36
| | | | | | | | for and ignore ERRmoredata errors as the client library doesn't support 32-bit error messages. Added some annotations for the RPC pipe code to make it a bit clearer maybe.
* Fixed some return code checks for cli_initialise() from False to NULL.Tim Potter2001-06-142-2/+2
| | | | Spotted by Joe Doran <joed@interlude.eu.org>
* Removed irritating and unecessary debug message.Tim Potter2001-06-021-3/+0
|
* Broke out change trust account password routines into separate fileTim Potter2001-05-172-218/+245
| | | | | since they're only used in one place anyway (timeout_processing() in process.c)
* Added a SMB_ASSERT() so that two cli_state structures aren't openedTim Potter2001-05-041-0/+3
| | | | | | | | | | | | on different pipes. This seriously confuses NT. Unfortunately HEAD branch is limited to one rpc pipe per connection as the fnum is stored inside the cli_state structure. It should really be broken out into it's own structure so multiple pipes can be opened on one TCP/IP socket. What a good idea! But look over here! I've already done it in another workarea but it will require a day or two to refactor some of the internal samba rpc client stuff (i.e netlogon requests) so it will remain uncommitted for another while.
* fixed some uninitialised variablesAndrew Tridgell2001-05-011-5/+5
|
* few cleanups to bring in line with 2.2Gerald Carter2001-04-286-6/+0
|
* added getdriver and enumdrivers commands. Also fixedGerald Carter2001-03-151-1/+1
| | | | | enumprinters so that it works as well. Couple of other misc fixes while we're working on rpcclient.
* Removed JRATEST line.Jeremy Allison2001-03-111-4/+0
| | | | Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-3/+25
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.Jeremy Allison2001-03-0910-135/+159
| | | | | | | | | We were reading the endainness in the RPC header and then never propagating it to the internal parse_structs used to parse the data. Also removed the "align" argument to prs_init as it was *always* set to 4, and if needed can be set differently on a case by case basis. Now ready for AS/U testing when Herb gets it set up :-). Jeremy.
* Sync up handle creation with 2.2 branch. We can now join AS/U domains andJeremy Allison2001-03-073-20/+14
| | | | | authenticate against them. Big/little endian issues fixed. Jeremy.