summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Make smbd/posix_acls.c use abstract interface.Jeremy Allison2000-12-061-0/+110
| | | | | include/smb_acls.h lib/sysacls.c: Added as interface definitions. Jeremy.
* Changed to sourceforge tdb code. This includes spinlocks (so we now haveJeremy Allison2000-12-061-7/+7
| | | | | | | | a --with-spinlocks option to configure, this does mean the on-disk tdb format has changed, so 2.2alphaX sites will need to re-create their tdb's. The upside is no more tdb fragmentation and a +5% on netbench. Swings and roundabouts.... Jeremy.
* fixed messaging bug - use strlen() instead of sizeof() in key lengthAndrew Tridgell2000-12-021-2/+2
|
* Allow zero length smb.conf files.Tim Potter2000-12-011-2/+0
|
* Use lp_codepagedir() instead of CODEPAGEDIR when loading the unicode map.Tim Potter2000-12-011-2/+3
| | | | Found by Joseph Cheek <joseph@cheek.com>
* Another large patch for the passdb rewrite.Gerald Carter2000-11-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | o added BOOL own_memory flag in SAM_ACCOUNT so we could use static memory for string pointer assignment or allocate a new string o added a reference TDB passdb backend. This is only a reference and should not be used in production because - RID's are generated using the same algorithm as with smbpasswd - a TDB can only have one key (w/o getting into problems) and we need three. Therefore the pdb_sam-getpwuid() and pdb_getsampwrid() functions are interative searches :-( we need transaction support, multiple indexes, and a nice open source DBM. The Berkeley DB (from sleepycat.com seems to fit this criteria now) o added a new parameter "private dir" as many places in the code were using lp_smb_passwd_file() and chopping off the filename part. This makes more sense to me and I will docuement it in the man pages o Ran through Insure-lite and corrected memory leaks. Need for a public flogging this time Jeremy (-: -- jerry
* fixed the problem with messages not getting throughAndrew Tridgell2000-11-171-1/+1
| | | | | | | | | | the problem had nothing to do with being your own pid, it was instead a problem with IPC$ connections not being registered in the connections database and an incorrect test for -1 in the messaging code. These changes also mean that IPC$ shares now show up in smbstatus. That is probably a good thing.
* save and restore errno in selectAndrew Tridgell2000-11-171-1/+5
|
* Delete queue on empty.Jeremy Allison2000-11-171-2/+7
| | | | Jeremy.
* the duplicate checking code will cause unaligned accesses on non-intelAndrew Tridgell2000-11-171-4/+4
| | | | processors. Fixed.
* use process_exists() not kill(pid, 0)Andrew Tridgell2000-11-171-1/+1
|
* Fix for a problem with the new messaging system. If a sender is using theJeremy Allison2000-11-162-6/+42
| | | | | | | | | | | | | | messaging system as a notification mechanism, and the speed of notification greatly exceeds the speed of message recovery, then you get a massively (>75Mb) growing tdb. If the message is a simple notification, then the message is static, and you only need one of them in transit to a target process at any one time. This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives. If set to False, then before sending a message the sender checks the existing message queue for a target pid for a duplicate of this message, and doesn't add to it if one already exists. Also added code into msgtest.c to test this. Jeremy.
* Fix for plaintext passwords from Pat Sandfort @ HP.Jeremy Allison2000-11-161-3/+6
| | | | Jeremy.
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-51/+0
| | | | | | | | | a byte range lock (write lock only, but Win2k breaks on read lock also so I do the same) - if you think about why, this is obvious. Also fixed our client code to do level II oplocks, if requested, and fixed the code where we would assume the client wanted level II if it advertised itself as being level II capable - it may not want that. Jeremy.
* 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