summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Large commit which restructures the local password storage API.Gerald Carter2000-11-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge of Herb's profiling code.Jeremy Allison2000-11-111-0/+1
| | | | Jeremy.
* Merge in Herb's changes from 2.2.Jeremy Allison2000-11-101-1/+1
| | | | Jeremy.
* Fix from John E. Malmberg <wb8tyw@qsl.net> for -1 return in interfaces scan.Jeremy Allison2000-11-101-2/+2
| | | | Jeremy.
* 64 bit fix from Uros Prestor <uros@turbolinux.com>.Jeremy Allison2000-11-061-3/+3
| | | | Jeremy.
* Fix some compiler warnings.Tim Potter2000-11-041-6/+6
|
* Fixed silly bug in dup2 code found by Kenichi Okuyama@Tokyo Research Lab. ↵Jeremy Allison2000-10-281-1/+1
| | | | | | IBM-Japan. Co. Jp. Jeremy.
* Even when looking up a users groups via winbindd even if the lookup forJeremy Allison2000-10-251-2/+2
| | | | | | | | the list of groups a user is in succeeds via winbind, we must allow the lookup of the group name -> gid we are checking if the user is a member of to go via winbind or /etc/group - as it may be a group on the local box we are checking against. This is a subtle one..... Jeremy.
* John Reilly @ HP (who is a wonderful human being and *definately* needsJeremy Allison2000-10-251-2/+0
| | | | | | | | CVS commit access :-) has written a simple routine that peeks inside the MS PE printer driver file format and can tell if a driver is W2K or NT4.x. So we can now correctly return the driver version number. Hurrah ! JF - this is the code you always wanted ..... :-) :-). Jeremy.
* Fixed missing bracket on debug statement.Tim Potter2000-10-191-1/+1
|
* Added David O'Neills fix to HEAD (hmmm. how did this compile... :-).Jeremy Allison2000-10-131-1/+1
| | | | Jeremy.
* Fix to allow smbd to call winbindd if it is running for all group enumeration,Jeremy Allison2000-10-132-32/+148
| | | | | | | | falling back to the UNIX calls on error. This should fix all problems with smbd enumerating all users in all groups in all trusted domains via winbindd. Also changed GETDC to query 1C name rather than 1b name as only the PDC registers 1b. Jeremy.
* lib/messages.c add debug print for receipt of PING andHerb Lewis2000-10-121-0/+2
| | | | | | REQ_DEBUGLEVEL messages utils/smbcontrol.c allow "q" to exit interactive mode. Exit on error from message_init.
* Turns out we do need the pwnam check as on many systems the usersJeremy Allison2000-10-111-0/+7
| | | | | primary group is not listed in the groups file... Jeremy.
* Fixed %d printf with unsigned long arg.Jeremy Allison2000-10-111-1/+1
| | | | Jeremy.
* changes to sync with 2.2. treeHerb Lewis2000-10-111-0/+12
| | | | | | | | | | | | | | | | | .cvsignore remove config.h - not in this directory include/profile.h profile changes lib/messages.c added message to return debug level libsmb/clierror.c cast to get rid of compiler warning libsmb/smbencrypt.c cast to get rid of compiler warning profile/profile.c add flush profile stats changes for profile struct rpc_parse/parse_samr.c fix for compiler warning rpc_server/srv_samr.c cast to get rid of compiler warning smbd/ipc.c profile stats message.c profile stats smbd/negprot.c profile stats smbd/nttrans.c profile stats smbd/trans2.c profile stats utils/smbcontrol.c new flush stats command
* Fix to avoid calling getgrgid for no reason.Jeremy Allison2000-10-111-21/+9
| | | | Jeremy.
* Fixed nasty size wrong bug spotted by the eagle eyes ofJeremy Allison2000-10-101-1/+1
| | | | | JF :-). Jeremy.
* sys_popen got damaged when converted from FILE * to int fd I think.Jeremy Allison2000-10-081-14/+3
| | | | | Patrick Powell kindly pointed out the bug. Jeremy.
* Fix for printf attribute from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>Jeremy Allison2000-10-061-4/+4
| | | | | Added "codepage directory" patch from Peter.Polkinghorne@brunel.ac.uk Jeremy.
* Print socket options - patch from Dave Collier-Brown @ Sun.Jeremy Allison2000-10-061-2/+23
| | | | Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-1/+0
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Made re-init of stat cache explicit rather than being hidden.Jeremy Allison2000-10-041-4/+0
| | | | Jeremy.
* Adding Herb's compile warning fixes to HEAD.Jeremy Allison2000-10-045-13/+17
| | | | Jeremy.
* utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison2000-10-033-13/+476
| | | | | mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy.
* added a hack to get 64 bit locking working with the broken fcntl()Andrew Tridgell2000-09-291-0/+14
| | | | | call in glibc 2.1.95. This hack only gets enabled if you define GLIBC_HACK_FCNTL64
* Removed annoying unecessary debug message.Tim Potter2000-09-281-1/+0
|
* Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison2000-09-272-292/+8
| | | | | | | through the VFS. All file access/directory access code in smbd should now go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl() vfs_set_nt_acl() call API design. Jeremy.
* fix for IRIX compiler error messagesHerb Lewis2000-09-261-3/+3
|
* first cut at smbcontrol program. It currently allows syntax like:Andrew Tridgell2000-09-131-0/+43
| | | | | | | smbcontrol nmbd debug 7 smbcontrol smbd debug 9 smbcontrol 3278 debug 1 smbcontrol nmbd force-election
* fixed a race in the pipe() setup in sys_select()Andrew Tridgell2000-09-121-1/+1
|
* - fixed some memory leaks in the messages codeAndrew Tridgell2000-09-121-1/+28
| | | | - added a MSG_PING message for performance testing.
* - changed the msg_type to be an int instead of an enum so that it isAndrew Tridgell2000-09-122-14/+19
| | | | | | | easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election
* much nicer message interface. We now register dispatch functions,Andrew Tridgell2000-09-122-26/+62
| | | | | | | | | allowing new bits of code or vfs modules to register functions without impacting on the messaging code itself. Also note that multiple registrations for the same message type are possible allowing the same message to be delivered to multiple parts of the code (possibly useful for reload messages).
* the first cut of the internal messaging system.Andrew Tridgell2000-09-112-44/+254
| | | | | The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message.
* Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2000-09-011-0/+75
| | | | | | | | | | | | | | | | | | | - 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
* -U% should be an anonymous connection. Fixed bug whereGerald Carter2000-09-011-1/+2
| | | | | | | | | | | the password was being set to "" instead of NULL. ..and yes Elrond, I'll merge this into TNG. P jerry
* Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison2000-08-301-0/+2
| | | | | | possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy.
* added -P (for no prompt) and -A <authfile> optionsGerald Carter2000-08-291-22/+92
| | | | jerry
* needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter2000-08-291-0/+30
| | | | | | | | and made it non-static --jerry
* made reopen_logs() always re-open logs, not try and be smart about notAndrew Tridgell2000-08-281-37/+34
| | | | | re-opening in some circumstances. This fixes a problem where a HUP does not re-open logs and leaves the log open on a unlinked file.
* - fixed the %U macro so that the old (and documented) semantics workAndrew Tridgell2000-08-251-2/+13
| | | | | | | | | again. This got broken with one of the substitute.c updates a couple of months ago. - also fixed %u to return the username from the current_user structure when called via a method that does not have direct access to the username. I cache the uidtoname() result to prevent thrashing nss.
* Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison2000-08-231-2/+2
| | | | Jeremy.
* oops. must return "" string and length zero when strlen(filebuf) == 0Luke Leighton2000-08-181-13/+16
|
* getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]Luke Leighton2000-08-181-10/+13
| | | | is NOT ok.
* Reverted the change Luke made. Removed IS_BITS_SET_XX macros.Jeremy Allison2000-08-141-13/+7
| | | | | | | | Do not re-add them. These macros are unsafe as they are not understood. Change all TNG code using them to correct '&' and '|' please. IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME should have been used. Jeremy.
* hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!Luke Leighton2000-08-141-2/+4
| | | | | | [got confused with which way dirdiff was going :)]. ... but you forgot to update TNG's lib/cmd_interp.c...
* jeremy,Luke Leighton2000-08-141-11/+15
| | | | | | | | | | | | | | | | | please do not remove IS_BITS_SET_XXX macros just because you happen "not to like them". whilst still working on merging, you are not responsible for this code, therefore do not hinder its development whilst people are attempting to do merges. after the merge from TNG to cvs main is completed, you can do what the hell you like. thank you. jerry, please could you consider adding underlying routines (in this case get_safe_smb_errstr()) instead of reverting to a [less secure] previous coding method. thanks.
* fixed unistr_to_ascii to deal with NULL src stringsGerald Carter2000-08-121-14/+14
| | | | jerry
* reworked talloc() to in order to help track down invalidGerald Carter2000-08-121-25/+26
| | | | | | | | | | | | | | | | | memory access. Tridge, I don't think using 0xdeadbeef for size allocations of 0 is going to work. I ended up having to use NULL as much code that works on UNISTR checks to see if the buffer ptr is NULL. So valid code ends up with a seg fault. Rather than rewriting it all, I added a DEBUG_TALLOC #ifdef in talloc.h that sets a macro BAD_PTR. This is the value assigned to ptr for an allocation of 0 bytes. jerry