summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2000-11-21Another large patch for the passdb rewrite.Gerald Carter1-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 (This used to be commit 4792029a2991bd84251d152a62b1033dec62cee2)
2000-11-17fixed the problem with messages not getting throughAndrew Tridgell1-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. (This used to be commit 3575ad10985a18f897e38179ca69fa9a49a7ea02)
2000-11-17save and restore errno in selectAndrew Tridgell1-1/+5
(This used to be commit 34f0379096d0701c74a51c51649ffe4cb1a24291)
2000-11-17Delete queue on empty.Jeremy Allison1-2/+7
Jeremy. (This used to be commit 6e18a2aa58bc485e3c803ff357acc1b7fe6d95e1)
2000-11-17the duplicate checking code will cause unaligned accesses on non-intelAndrew Tridgell1-4/+4
processors. Fixed. (This used to be commit 64d38c24100cb3409b38b9923734f2a6202bdc2a)
2000-11-17use process_exists() not kill(pid, 0)Andrew Tridgell1-1/+1
(This used to be commit 30048cff12e03c95ef43ba4ee16af1df2de9dbc8)
2000-11-16Fix for a problem with the new messaging system. If a sender is using theJeremy Allison2-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. (This used to be commit 3aa7995660395ecb85c8e35b638fa9fbbb952558)
2000-11-16Fix for plaintext passwords from Pat Sandfort @ HP.Jeremy Allison1-3/+6
Jeremy. (This used to be commit b8753b92fbeb1d6768d0559e12ff2aa1d0148419)
2000-11-16Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison1-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. (This used to be commit 213cd0b5192307cd4b0026cae94b2f52fb1b0c02)
2000-11-13Large commit which restructures the local password storage API.Gerald Carter1-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 (This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
2000-11-11Merge of Herb's profiling code.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 3be056c71aa8e0a4ba70d397107199004bdb7d3f)
2000-11-10Merge in Herb's changes from 2.2.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 24d76c5fbda29d89c96d7c22193ec2eb93ad3887)
2000-11-10Fix from John E. Malmberg <wb8tyw@qsl.net> for -1 return in interfaces scan.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 4d25a53c36ad2c33cc2ecaf1486e18f1536eff95)
2000-11-0664 bit fix from Uros Prestor <uros@turbolinux.com>.Jeremy Allison1-3/+3
Jeremy. (This used to be commit 9a5471b3e861aa864ffff5fc87ac2681de7b0068)
2000-11-04Fix some compiler warnings.Tim Potter1-6/+6
(This used to be commit 852de9226d50ccac71ec1691052a6e395283ca56)
2000-10-28Fixed silly bug in dup2 code found by Kenichi Okuyama@Tokyo Research Lab. ↵Jeremy Allison1-1/+1
IBM-Japan. Co. Jp. Jeremy. (This used to be commit 9c2272e056aef741c4b86f9a247c3534944d9eff)
2000-10-25Even when looking up a users groups via winbindd even if the lookup forJeremy Allison1-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. (This used to be commit 4ffda462b97e4f35c6d050c579dfe3e3b64e2c9f)
2000-10-25John Reilly @ HP (who is a wonderful human being and *definately* needsJeremy Allison1-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. (This used to be commit fd17374e6d888813f4ed7142480cf93b8a16bfef)
2000-10-19Fixed missing bracket on debug statement.Tim Potter1-1/+1
(This used to be commit 9328bc7b8a7d43ef0da47413f314f9943ea98847)
2000-10-13Added David O'Neills fix to HEAD (hmmm. how did this compile... :-).Jeremy Allison1-1/+1
Jeremy. (This used to be commit e222057140edb3f14d76e54bd6e744919f50b4df)
2000-10-13Fix to allow smbd to call winbindd if it is running for all group enumeration,Jeremy Allison2-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. (This used to be commit 5b0038a2afd8abbd6fd4a58f5477a40d1926d498)
2000-10-12lib/messages.c add debug print for receipt of PING andHerb Lewis1-0/+2
REQ_DEBUGLEVEL messages utils/smbcontrol.c allow "q" to exit interactive mode. Exit on error from message_init. (This used to be commit cda8c0439113dcce02a681b0aaddf69326c0ec9a)
2000-10-11Turns out we do need the pwnam check as on many systems the usersJeremy Allison1-0/+7
primary group is not listed in the groups file... Jeremy. (This used to be commit b1cb7bec51963ac2ddc62dd1abbf8f8fa4351f9b)
2000-10-11Fixed %d printf with unsigned long arg.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 448ff58fd5a88b1fdadfb9a8e0bc5f38b707a4d3)
2000-10-11changes to sync with 2.2. treeHerb Lewis1-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 (This used to be commit bbb24daa25dca4e4b6b1f8942cd84ee3aa1bed8e)
2000-10-11Fix to avoid calling getgrgid for no reason.Jeremy Allison1-21/+9
Jeremy. (This used to be commit b057a7349b2d6420f96a6ebc31822da66b39fe6c)
2000-10-10Fixed nasty size wrong bug spotted by the eagle eyes ofJeremy Allison1-1/+1
JF :-). Jeremy. (This used to be commit 443293a06530d0a5421b39d9a6a224d6ae316bd3)
2000-10-08sys_popen got damaged when converted from FILE * to int fd I think.Jeremy Allison1-14/+3
Patrick Powell kindly pointed out the bug. Jeremy. (This used to be commit 1f156b2420b7ecf1266e650efc3cee55362e29dd)
2000-10-06Fix for printf attribute from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>Jeremy Allison1-4/+4
Added "codepage directory" patch from Peter.Polkinghorne@brunel.ac.uk Jeremy. (This used to be commit e49566c2e21fcd16980e5110495645c5ae5a36da)
2000-10-06Print socket options - patch from Dave Collier-Brown @ Sun.Jeremy Allison1-2/+23
Jeremy. (This used to be commit c18d6f8701c8e6ca03f9fff79cf28c842b3b5ff9)
2000-10-06Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison1-1/+0
We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy. (This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-04Made re-init of stat cache explicit rather than being hidden.Jeremy Allison1-4/+0
Jeremy. (This used to be commit b0c40236bb4381fec0e812c20e5f8c09ebf005f9)
2000-10-04Adding Herb's compile warning fixes to HEAD.Jeremy Allison5-13/+17
Jeremy. (This used to be commit d131ad1ce3f6e72e295f865a463f8dcbfa6f8d42)
2000-10-03utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.Jeremy Allison3-13/+476
mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>. jeremy. (This used to be commit b40191d27180ab1e59935086073c4d312552f717)
2000-09-29added a hack to get 64 bit locking working with the broken fcntl()Andrew Tridgell1-0/+14
call in glibc 2.1.95. This hack only gets enabled if you define GLIBC_HACK_FCNTL64 (This used to be commit d8b9ec741cc57b5f3dd1b3ef782a7baed402beaa)
2000-09-28Removed annoying unecessary debug message.Tim Potter1-1/+0
(This used to be commit b1a893b74114ee4ab6a295ac0cb0e8fdccda3f53)
2000-09-27Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison2-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. (This used to be commit f96625ec124adb6e110dc54632e006b3620a962b)
2000-09-26fix for IRIX compiler error messagesHerb Lewis1-3/+3
(This used to be commit f2549db1ce6527c3e378e9f9210c70be5de93762)
2000-09-13first cut at smbcontrol program. It currently allows syntax like:Andrew Tridgell1-0/+43
smbcontrol nmbd debug 7 smbcontrol smbd debug 9 smbcontrol 3278 debug 1 smbcontrol nmbd force-election (This used to be commit 5f91c24636f5d82486f22c10bc55e060f9c518bf)
2000-09-12fixed a race in the pipe() setup in sys_select()Andrew Tridgell1-1/+1
(This used to be commit bb0f769272d8a8bd527053746b468bca797e1663)
2000-09-12- fixed some memory leaks in the messages codeAndrew Tridgell1-1/+28
- added a MSG_PING message for performance testing. (This used to be commit e779f834dbb875669c3aa0a35b324aa13f0c8c36)
2000-09-12- changed the msg_type to be an int instead of an enum so that it isAndrew Tridgell2-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 (This used to be commit f1c49ca7ce56bc39259041a71479e84ebf53eeca)
2000-09-12much nicer message interface. We now register dispatch functions,Andrew Tridgell2-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). (This used to be commit c3350c77f52cade48d2945574e09cb630af85b92)
2000-09-11the first cut of the internal messaging system.Andrew Tridgell2-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. (This used to be commit 2a34ee95f3929cff131db6c5a2b4820194c05b2d)
2000-09-01Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill1-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 (This used to be commit 74af3e2caec7197e5d1ca389e2f78054a4197502)
2000-09-01-U% should be an anonymous connection. Fixed bug whereGerald Carter1-1/+2
the password was being set to "" instead of NULL. ..and yes Elrond, I'll merge this into TNG. P jerry (This used to be commit cc611ecc674832f7e7390b5e7ad6648c9d622e9e)
2000-08-30Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison1-0/+2
possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy. (This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5)
2000-08-29added -P (for no prompt) and -A <authfile> optionsGerald Carter1-22/+92
jerry (This used to be commit 2d95c38f7e65a0379cbaadd57b8eb41d830b5a6b)
2000-08-29needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter1-0/+30
and made it non-static --jerry (This used to be commit dfdca21bd90b9c83f195d580ec9d774f1be8f9cb)
2000-08-28made reopen_logs() always re-open logs, not try and be smart about notAndrew Tridgell1-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. (This used to be commit f99f028c77482e591741df2a3da7f036f7409a68)