summaryrefslogtreecommitdiffstats
path: root/source/smbd/lanman.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* include/vfs.h:Jeremy Allison2001-01-231-2/+2
| | | | | | | | | | | | | smbd/vfs-wrap.c: smbd/vfs.c: Added fchmod_acl and chmod_acl. lib/substitute.c: smbd/lanman.c: smbd/open.c: smbd/process.c: smbd/reply.c: smbd/service.c: Removed sessetup_user variable. Added current_user_info struct which conatins domain info etc. Added '%D' for client domain parameter. Jeremy.
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-221-3/+4
| | | | | | | | | | source/smbd/lanman.c - cleanup and bug fix for win9x print queue purge. source/printing/printing.c - cleanup and bug fix for win9x print queue purge. - print_job_end() changed to cleanup spool file in the event of a failure returned from the print_run_command()
* Changes from APPLIANCE_HEAD:David O'Neill2001-01-171-3/+4
| | | | | source/smbd/lanman.c - Change fill_printq_info() to fix corrupted 9X/ME printer comment
* Fixed bug with Win9x/ME where drivername was being returned incorrectly inJeremy Allison2000-12-071-36/+46
| | | | | one printq case. Now goes though common function. Jeremy.
* file_lines_load/file_lines_pload can now optionally convert unix_to_dos()Jeremy Allison2000-12-071-3/+3
| | | | | on read. Jeremy.
* Fix for off-by-one StrnCpy.Jeremy Allison2000-11-211-1/+1
| | | | Jeremy.
* Fix from Jim McDonough @ IBM for OS/2 clients.Jeremy Allison2000-11-161-0/+10
| | | | Jeremy.
* Large commit which restructures the local password storage API.Gerald Carter2000-11-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+) are broken, but they were somewhat broken before. :) The following functions implement the storage manipulation interface /*The following definitions come from passdb/pdb_smbpasswd.c */ BOOL pdb_setsampwent (BOOL update); void pdb_endsampwent (void); SAM_ACCOUNT* pdb_getsampwent (void); SAM_ACCOUNT* pdb_getsampwnam (char *username); SAM_ACCOUNT* pdb_getsampwuid (uid_t uid); SAM_ACCOUNT* pdb_getsampwrid (uint32 rid); BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass); BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override); BOOL pdb_delete_sam_account (char* username); There is also a host of pdb_set..() and pdb_get..() functions for manipulating SAM_ACCOUNT struct members. Note that the struct passdb_ops {} has gone away. Also notice that struct smb_passwd (formally in smb.h) has been moved to passdb/pdb_smbpasswd.c and is not accessed outisde of static internal functions in this file. All local password searches should make use of the the SAM_ACCOUNT struct and the previously mentioned functions. I'll write some documentation for this later. The next step is to fix the TDB passdb backend, then work on spliting the backends out into share libraries, and finally get the LDAP backend going. What works and may not: o domain logons from Win9x works o domain logons from WinNT 4 works o user and group enumeration as implemented by Tim works o file and print access works o changing password from Win9x & NT ummm...i'll fix this tonight :) If I broke anything else, just yell and I'll fix it. I think it should be fairly quite. -- jerry
* More merging of printing stuff from appliance.Tim Potter2000-11-081-3/+3
|
* Call standard_sub_advanced() after lp_logon_XX() calls.Jeremy Allison2000-10-301-0/+2
| | | | Jeremy.
* Renamed WPrintQueuePurge to WPrintQueueCtrl as this function can purge, pauseTim Potter2000-10-181-4/+4
| | | | or resume a print queue.
* global_myname is actually a pstring.Tim Potter2000-10-061-1/+1
|
* Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2000-09-011-12/+16
| | | | | | | | | | | | | | | | | | | - make proto - addition of function to convert from errno values to NT status codes (source/lib/error.c) - purge queue done without full access permission will purge only the jobs owned by that user, rather than failing. - unlock job database tdb before sending job to printer - in print_job_start(), ensure that we don't pick a jobid with an existing temporary file that may be owned by another user, as it causes silent failures. - fixes for printer permission checking for NT5 clients (source/include/rpc_spoolss.h, source/printing/nt_printing.c, source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c) - change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c) - fixed memory leaks for win95 driver download process (source/smbd/lanman.c) - properly free prs_structs and dacl in testsuite/printing/psec.c
* make sure a couple of variables are initialisedAndrew Tridgell2000-08-311-2/+2
|