summaryrefslogtreecommitdiffstats
path: root/source/smbd/lanman.c
Commit message (Collapse)AuthorAgeFilesLines
* Progress on CR 601Gerald Carter2003-02-251-3/+3
| | | | | | | | | cache the printer_info_2 with the open printer handle. cache is invalidated on a mod_a_printer() call **on that smbd**. Yes, this means that the window for admins to step on each other from different clients just got larger, but since handles a generally short lived this is probably ok.
* Remove an unused paramter for our old LM-only password change code, and fix aAndrew Bartlett2003-01-111-2/+2
| | | | | | (harmless) fstring/pstring mixup. Andrew Bartlett
* BIG patch...Andrew Bartlett2003-01-021-18/+19
| | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett
* Move our password change code along a little - use NTSTATUS, and implmenetAndrew Bartlett2003-01-011-20/+2
| | | | | | minimum password age and min password length for all password changes. Andrew Bartlett
* Add const to PACKS()Andrew Bartlett2002-11-151-2/+2
|
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-10/+8
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* merge from samba_3_0Gerald Carter2002-10-211-218/+91
| | | | | | | | | | | removed the following parameters * postscript * printer driver * printer driver location * printer driver file also removed the get_a_printer_driver_9x_compatible() function
* This moves the group mapping API into the passdb backend.Volker Lendecke2002-10-211-1/+1
| | | | | | | | | | | | Currently this calls back to mapping.c, but we have the framework to get the information into LDAP and the passdb.tdb (should we? I think so..). This has received moderate testing with net rpc vampire and usrmgr. I found the add_groupmem segfault in add_aliasmem as well, but that will be another checkin. Volker
* Push Steve Langasek's fix ...Richard Sharpe2002-10-051-1/+1
|
* 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.