summaryrefslogtreecommitdiffstats
path: root/source/smbd/lanman.c
Commit message (Collapse)AuthorAgeFilesLines
* Add some const & static, remove unused functions.Andrew Bartlett2002-07-211-1/+1
|
* Gone back to explicit queue number passing as snum - removed encoding ofJeremy Allison2002-07-171-14/+19
| | | | | | queueid in job number. This means we must have an internal tdb to store mapping from 16 bit RAP jobid's to 32 bit RPC jobids. Jeremy.
* Lanman print jobs are *16* bits, not 32. arggggh. Map them....Jeremy Allison2002-07-171-8/+8
| | | | Jeremy.
* enum_group_mapping takes an enum not an intAndrew Tridgell2002-07-151-1/+1
|
* Address the string_sub problem by changing len = 0 to mean "no expand".Jeremy Allison2002-07-021-5/+5
| | | | | | Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy.
* Don't use uint. It doesn't exist on some platforms and we don't define it.Jeremy Allison2002-06-211-1/+1
| | | | | Replaced with "unsigned int". Jeremy.
* Got rid of unused flags field in lanman api_commands[].Tim Potter2002-06-201-36/+49
| | | | | | | | | | | | | | Added an auth_user field which denotes whether the api call can be made anonymously. In combination with lp_restrict_anonymous() this can decrease the amount of information that can be retrieved anonymously. So far NetShareEnum, NetSessionEnum, NetGroupEnum, NetGroupGetUsers, NetUserEnum, PrintQEnum, NetFileEnum cannot be called anonymously. SamOEMChangePassword and NetServerEnum can be called anonymously. All other functions can be called anonymously until it can be proven that they can't to avoid breaking anything.
* Move session gathering routine back into session.c so it can be called eitherJim McDonough2002-06-031-46/+8
| | | | in RAP or RPC environment.
* Spelling fix.Tim Potter2002-05-191-1/+1
|
* A few things in this commit:Andrew Bartlett2002-05-181-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup some of the code in net_rpc_join re const warnings and fstrings. Passdb: Make the %u and %U substituions in passdb work. This is done by declaring these paramters to be 'const' and doing the substitution manually. I'm told this is us going full circle, but I can't really see a better way. Finally these things actually seem to work properly... Make the lanman code use the pdb's recorded values for homedir etc rather than the values from lp_*() Add code to set the plaintext password in the passdb, where it can decide how to store/set it. For use with a future 'ldap password change' option, or somthing like that... Add pdb_unix, so as to remove the 'not in passdb' special cases from the local_lookup_*() code. Quite small, as it uses the new 'struct passwd -> SAM_ACCOUNT' code that is now in just one place. (also used by pdb_smbpasswd) Other: Fix up the adding of [homes] at session setup time to actually pass the right string, that is the unix homedir, not the UNC path. Fix up [homes] so that for winbind users is picks the correct name. (bad interactions with the default domain code previously) Change the rpc_server/srv_lsa_nt.c code to match NT when for the SATUS_NONE_MAPPED reply: This was only being triggered on no queries, now it is on the 'no mappings' (ie all mappings failed). Checked against Win2k. Policy Question: Should SID -> unix_user.234/unix_group.364 be considered a mapping or not? Currently it isn't. Andrew Bartlett
* add NetUserEnum and NetGroupEnum lanmap API calls, untested. I don't haveJean-François Micouleau2002-04-191-94/+152
| | | | | | | anymore a SNAP/DELL NAS to test. from Kevin Stefanik. J.F.
* Renamed get_nt_error_msg() to nt_errstr().Tim Potter2002-03-171-1/+1
|
* syncing up printing code with SAMBA_2_2 (already done some mergesGerald Carter2002-03-151-4/+4
| | | | | | | | | | | | | 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 should fix up the level 0 'convert_string' debug messages that we haveAndrew Bartlett2002-02-271-1/+1
| | | | | | | | been seing since the unicode conversion. It looks like a simple oversight in the move away from StrnCpy (which takes amount of space -1 as an arg) to push_ascii etc which take the absolute amount of space. Andrew Bartlett
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Oops...Andrew Bartlett2002-01-231-1/+1
|
* Change the order of this a bit - as unix password change can fail.Andrew Bartlett2002-01-231-11/+12
| | | | | | This due for abstraction into chgpasswd.c shortly. Andrew Bartlett
* One less Get_Pwnam_Modify call!Andrew Bartlett2002-01-211-5/+0
| | | | | | (the passdb backend is case-insensitive, so there isn't any point to this). Andrew Bartlett
* Kill off the old varient of 'check_plaintext_password' (new version justAndrew Bartlett2002-01-201-55/+28
| | | | | | | committed in auth/auth_compat.c and use the new version to make the plaintext password change slightly sane... (Needs testing). Andrew Bartlett
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-8/+8
| | | | Jeremy.
* Add an output parameter to message_send_all that says how manyMartin Pool2001-12-211-1/+1
| | | | | | messages were sent, so you know how many replies to expect. Const and doc religion.
* Store some path names in global variables initialized to configureMartin Pool2001-11-191-1/+1
| | | | default, rather than in preprocessor macros.
* This commit is number 3 of 4.Andrew Bartlett2001-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular this commit focuses on: Changing the Get_Pwnam code so that it can work in a const-enforced environment. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes allow for 'const' in the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username
* server support for RAP session list functionJim McDonough2001-10-221-0/+105
|
* Use asprintf, do bounds check, better rc logicJim McDonough2001-10-201-33/+43
|
* Add RAP net share add supportJim McDonough2001-10-191-31/+113
|
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* Fix up a number of intertwined issues:Andrew Bartlett2001-09-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The big one is a global change to allow us to NULLify the free'ed pointer to a former passdb object. This was done to allow idra's SAFE_FREE() macro to do its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer to start with. This NULL pointer test was what was breaking the adding of accounts up until now, and this code has been reworked to avoid duplicating work - I hope this will avoid a similar mess-up in future. Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were being ignored. Some of these functions malloc() and are permitted to fail. Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived precisely didilly-squat, just returning False. Now that we check the returns this bug was spotted. This could allow different LM and NT passwords. - the pdbedit code needs to start checking these too, but I havn't had a chance to fix it. I have also fixed up where some of the password changing code was using the pdb_set functions to store *internal* data. I assume this is from a previous lot of mass conversion work... Most likally (and going on past experience) I have missed somthing, probably in the LanMan password change code which I havn't yet been able to test, but this lot is in much better shape than it was before. If all this is too much to swallow (particularly for 2.2.2) then just adding a sam_pass = NULL to the particular line of passdb.c should do the trick for the ovbious bug. Andrew Bartlett
* Fix this to use the plaintext password code directly, like SWAT does.Andrew Bartlett2001-09-261-7/+11
| | | | | | | | | | | This whole area needs to be cleaned up. Should this kind of passowrd change/check be permitted with encrypt passwords = yes? In any case I've also had trouble testing this, as I can't find the right software/configuration to exersise this behaviour. But its better than the previous situation. Any assistance greatly appriciated. Andrew Bartlett
* move to SAFE_FREE()Simo Sorce2001-09-171-18/+14
|
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-041-6/+13
| | | | the client code still needs some work
* tidied up some unused vars in JFs new fnsAndrew Tridgell2001-09-031-12/+0
|
* Ouch ! I didn't think I would have to do that: add 2 new rap calls !Jean-François Micouleau2001-08-281-0/+127
| | | | | | | | | It's a quick and ugly hack as a proof of concept: the dell powervault 705 works with a samba PDC. I'll do a correct user enumeration later. J.F.
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-2/+8
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* More constant conversions.Tim Potter2001-08-101-2/+2
|
* merge from 2.2Gerald Carter2001-08-101-1/+1
|
* Added Gerald's lanman printing only change to HEAD.Jeremy Allison2001-08-061-99/+91
| | | | Jeremy.
* This removes unused paramaters from various authtication functions, and shouldAndrew Bartlett2001-07-081-1/+1
| | | | | | | | | not change behaviour. This should make my later diffs smaller, where I actualy start cleaning up this mess... Andrew Bartlett
* 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-041-20/+18
| | | | | | | 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.
* Patch from Simo:Gerald Carter2001-05-071-2/+2
| | | | | | o sed 's/pdb_clear_sam/pdb_free_sam/g' o add pdb_reset_sam() o password changing should be ok now as well.
* Big cleanup of passdb and backends.Jean-François Micouleau2001-05-041-2/+6
| | | | | | | I did some basic tests but I have probably broken something. Notably the password changing. So don't cry ;-) J.F.
* - added test for vasprintfAndrew Tridgell2001-04-281-12/+0
| | | | | | | | - cleaned up GNUC printf attribute macros - added enum handling in mkproto - removed non-vararg code - made slprintf and vslprintf just macros for snprintf and vsnprintf - don't need slprintf code any more
* started converting some of the only-ascii code to use srvstr_*Andrew Tridgell2001-03-311-11/+10
| | | | | | | added srvstr_push_ascii() and srvstr_pull_ascii() as convenience routines to replace the current usage of strncpy() like fns for packet pull/push. We need to do this in *lots* of places in Samba in order to get our codepage handling right
* Two OS/2 printer fixes from Jim McDonough @ IBM.Jeremy Allison2001-03-231-12/+59
| | | | | | | First one adds a new info level into the lanman printing and an ioctl to the trans2 code. Andrew - this uses ASCII only. It looks ok to me but please check ! Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped. Jeremy.
* ADMIN$ is an IPC share, not a disk shareAndrew Tridgell2001-03-171-1/+1
|
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-4/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.Jeremy Allison2001-02-231-13/+13
| | | | | | | | | | | | | include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We need these to be different as we're storing LPQ_xx enums in the tdb already. rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now returning status codes. smbd/lanman.c: Change the RAP status codes to have "RAP" in the name. printing/printing.c: Keep track of the status of a job. Allow a job to be deleted from one smbd when being submitted by another. Made logic in mutex clearer. Jeremy.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source/include/proto.h - make proto source/printing/nt_printing.c source/rpc_server/srv_spoolss_nt.c - Fix for the overwriting of printerdata entries when WinNT and Win2k are modifying printer parameters on PCL printers. Turns out that Win2k creates a printer with a NULL devmode entry and then expects to set it on *OPEN* (yes this is insane). So we cannot return a "default" devmode for a printer - and we must allow an open to set it. source/tdb/tdb.c - Show freelist in an easier format. Show total free. - When storing a new record, allocate memory for the key + data before the tdb_allocate() as if the malloc fails a (sparse) hole is left in the tdb. source/tdb/tdbtool.c - Show freelist in an easier format. Show total free. source/tdb/Makefile - cleaned up Makefile dependancies source/smbd/lanman.c - Fix for Win9x corrupting it's own parameter string. source/printing/printfsp.c source/printing/printing.c source/rpc_server/srv_spoolss_nt.c source/smbd/close.c - Added normal close parameter into print_fsp_end() which treats an abnormal close as error condition and deletes the spool file.
* smbd/lanman.c: Fix for calling qsort with 0 number.Jeremy Allison2001-01-241-1/+2
| | | | | | | smbd/nttrans.c: Realloc mem fixes based on those that went into trans2.c smbd/process.c: Move to a table based dispatch, based on a comment from Andrew about Antons work. Jeremy.