summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
AgeCommit message (Collapse)AuthorFilesLines
2001-10-20Move from timestamp to gen count file id's for finding oplocked filesJeremy Allison1-20/+23
in a tdb. Jeremy. (This used to be commit 058ae6b58f61ef46013dd076af3a84de5fbaaab1)
2001-10-19Ensure we mask off deny modes correctly on being set (this shouldn't haveJeremy Allison1-1/+1
caused problems but is tidier). Fix debug statement in locking.c Jeremy. (This used to be commit eac6bbd24ebf00b35e50953bc11186111dc39059)
2001-10-19Restored old Bmpx code - actually used by OS/2.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 7c1688fd67c1bda1477aaf870371c825280db870)
2001-10-12Some old stuff hanging around since the CIFS conference. Big cleanup ofTim Potter1-1/+0
rpcclient code. Refactored cmd_* functions to move common mem_ctx and pipe opening stuff up one level. Moved rpcclient.h into rpcclient directory and out of includes/smb.h (This used to be commit a40facba9651f9fb1dcc9e143f92ca298a324312)
2001-10-11initial kerberos/ADS/SPNEGO support in libsmb and smbclient. ToAndrew Tridgell1-0/+8
activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth (This used to be commit d33057585644e1337bac743e25ed7653bfb39eef)
2001-10-05Move CLI_POLICY_HND to be internal to winbindd.Tim Potter1-9/+0
(This used to be commit e7b84aee0832c9fa6509e55eba914c1515620e8a)
2001-09-18Correct fix for unaligned memcpy - malloc'ed memory incremented by ↵Jeremy Allison1-1/+4
sizeof(struct locking_data) was not forced to be 8 byte aligned. Use union to force it to be correctly aligned for memcpy and use void *, to tell compiler not to optimize aligned copy (this last fix suggested by Trond @ RedHat). The first fix should be sufficient, but this provides a "belt and braces" fix. Jeremy. (This used to be commit 22c5915bb466529ac1bcb5c2574888b360a9775b)
2001-09-16Start pushing the NTSTATUS stuff out to the wire for session setups.Andrew Bartlett1-0/+1
Rework the 'map to guest' code, its now possible to follow what its trying to do... Add an NT_STATUS_EQUAL(x,y) macro to make this stuff sane to look at. Andrew Bartlett (This used to be commit d618880661976644a6ee713edf969ad561e82097)
2001-09-06Annotated definition of NEW_PW_FORMAT_SPACE_PADDED_LEN constant.Tim Potter1-1/+3
(This used to be commit e3ec6197ede4a37113567c2ab406937c6ca80e9d)
2001-09-04it now all compiles - so try enabling it by default and see what explodes on ↵Andrew Tridgell1-2/+2
the build farm (This used to be commit 5bb7e4f0f65edf1db20245f403cbe81833134240)
2001-09-03the next step in our error code handling changeAndrew Tridgell1-1/+19
- added WERROR for win32 error codes - added a configure test for immediate structures still lots to do, so its not enabled by default, but the main structure is there (This used to be commit 24f9ab683dec52587ee56717e821b49c0fa3d70f)
2001-08-27converted another bunch of stuff to NTSTATUSAndrew Tridgell1-2/+2
(This used to be commit 1d36250e338ae0ff9fbbf86019809205dd97d05e)
2001-08-27started converting NTSTATUS to be a structure on systems with gcc in order ↵Andrew Tridgell1-0/+11
to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs (This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f)
2001-08-27converted smbd to use NTSTATUS by defaultAndrew Tridgell1-2/+2
major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night (This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
2001-08-13Moved across definition of dos error types from smb.h to doserr.hTim Potter1-4/+0
(This used to be commit 6c0dab85025dd7df9415edd627349fa8f1230de3)
2001-08-10Moved dos error codes from smb.h into new file doserr.hTim Potter1-113/+1
(This used to be commit 1bd8b6f79754aa8a14a7841b88f1c00d7a3767eb)
2001-07-22changed the iconv interface to go via ucs2 for all conversions. ThisAndrew Tridgell1-6/+4
fixes some problems wih some character sets and allows for using internal charsets in conjunction with ionv charsets this makes us slower but more correct. speed will come later. (This used to be commit 594f84b4e39182dcf344c02dc0185376a2726395)
2001-07-04The big character set handling changeover!Andrew Tridgell1-6/+28
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. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-30Ensure we return correct error on trying to unlock a region not locked.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 015a077acc49e59179dc10256fd32166ee4623e2)
2001-06-23Added other_safe_chars to alpha_strcpy(). Needs testing but is a betterJeremy Allison1-0/+2
fix for the problem. Jeremy. (This used to be commit e059fffd03a1382fb2b7059b6de369d9fc765a17)
2001-06-21Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually doesAndrew Tridgell1-1/+1
send unaligned unicode strings sometimes! Fixed our handling of the workgroup name tacked on the end of the NT1 negprot response (a unaligned unicode) fixed a couple of places where we should be using the message_end fns instead of pre-calculated buffer lengths (This used to be commit 86613493a9b2e56523153486931d0bf8d39beb7a)
2001-06-20initial support for paramter type P_LISTSimo Sorce1-1/+2
it will avoid problems with lists being longer than 1024 bytes just now only ip list parameters have been converted to the new type (hosts allow, hosts deny, ssl hosts, ssl hosts resign) (This used to be commit e1572f85d6247b760db10825b2fa688d7ed50bd3)
2001-06-08Extra stuff for large readwrite support.Jeremy Allison1-1/+2
Jeremy. (This used to be commit 4338ee78c3d7bcf4b9fac383ff2f572d882ab97c)
2001-05-24Fixup the large_writex problem (a large_writex can send a full 64k of data,Jeremy Allison1-0/+1
we already have space for this we just need to understand the length correctly). Jeremy. (This used to be commit 19145bae720bbcc32dcab380c62a33d1f0e3eef0)
2001-05-23This is *very* cool. I'm pretty convinced we can just set theJeremy Allison1-0/+1
CAP_LARGE_READX|CAP_LARGE_WRITEX bits on negprot and out W2K performance goes through the roof...... And as we *always* offer 64 buffers we can do this with this simple change..... Jeremy. (This used to be commit c328dda0fa081e79049d7a9ddac06e80cc8b331b)
2001-05-18Use canonical mappings for file controls. Fixes W2KSP2 profile problems (IJeremy Allison1-0/+11
think....). Jeremy. (This used to be commit 946cf3a0d7685e28af847b958ac01739335ea6e4)
2001-05-18merge from 2.2 (deleteprinterdriver RPC)Gerald Carter1-0/+1
(This used to be commit 515caaf7b448e55206433a9ca04fb5078f91cde2)
2001-05-07Preliminary merge of winbind into HEAD. Note that this compiles and linksTim Potter1-0/+8
but I haven't actually run it yet so it probably doesn't work. (-: (This used to be commit 59f95416b66db6df05289bde224de29c721978e5)
2001-05-04Big cleanup of passdb and backends.Jean-François Micouleau1-22/+19
I did some basic tests but I have probably broken something. Notably the password changing. So don't cry ;-) J.F. (This used to be commit a4a4c02b12f030a3b9e6225b999c90689dfc4719)
2001-04-28- added test for vasprintfAndrew Tridgell1-20/+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 (This used to be commit c7aeb2254dfc3cd0aa0b6c0bdd426f9323be0ddf)
2001-04-25converted the passdb smbpasswd implementation to using tallocGerald Carter1-2/+2
for memory allocation. This fixes a long standing seg fault (i knew i would get around to it one day :) ) Tested with NT4 and Win2k. Needs a little more testing with the "create the machine account on the fly" code for NT4. Simo, this is probably going to break the tdb passdb code. Can you look at that when you get a chance and see what you think? (This used to be commit 1c13110873e456748dc09fd51749f664643fe888)
2001-04-18merge from 2.2Andrew Tridgell1-0/+2
(This used to be commit f52a5014ee325f9d91f266f88eac51b6136a75b9)
2001-04-13Updated Major/Minor version to 4.50 - see notes.John Terpstra1-10/+14
(This used to be commit bdb68cf37e9b512e9f72f1cf20b7ca265888319e)
2001-03-30This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison1-1/+19
when copying to a full disk problem, I discovered that we were not allowing the delete on close flag to be set properly, this led to other things, and after investigation of the proper delete on close semantics and their relationship to the file_share_delete flag I discovered there were some cases where we weren't doing the deny modes properly. And this after only 5 years working on them..... :-) :-). So here's the latest attempt. I realised the delete on close flag needs to be set across all smbds with a dev/ino pair open - in addition, the delete on close flag, allow share delete and delete access requested all need to be stored in the share mode tdb. The "delete_on_close" entry in the fsp struct is now redundant and should really be removed. This may also mean we can get rid of the "iterate_fsp" calls that I didn't like adding in the first place. Whilst doing this patch, I also discovered we needed to do the se_map_generic() call for file opens and POSIX ACL mapping, so I added that also. This code, although ugly, now passes the deny mode torture tests plus the delete on close tests I added. I do need to add one more multiple connection delete on close test to make sure I got the semantics exactly right, plus we should also (as Andrew suggested) move to random testing here. The good news is that NT should now correctly delete the file on disk full error when copying to a disk :-). Jeremy. (This used to be commit 51987684bd231c744da2e5f3705fd236d5616173)
2001-03-11Moved cruft out of smb.h into ntdomain.h where it belongs. dc structJeremy Allison1-45/+0
now in pipe struct (where used) rather than user_struct. Secured machine account password changing in srv_netlog_nt.c - ensure that only the given machine can change its own password. May need to free this up later for NT admin tools, but this is a fail-safe secure position for now. Jeremy. (This used to be commit 46b12f2275dcd4b3114085160cd456441f9e921e)
2001-03-11Sync include files between 2.2 and HEAD except for acoount info.Jeremy Allison1-4/+4
Jeremy. (This used to be commit 73c7ace168e4aa6a47b366cf40ed6743a21d3638)
2001-03-11Remove "BYTE" - we already have uint8 - don't need more conflicts withJeremy Allison1-2/+0
system header files... Jeremy. (This used to be commit 31e0ce310ec38b3a3a05b344d6450d442c6be471)
2001-03-10to use the same macros in the client and server rename the CLISTR_Andrew Tridgell1-0/+8
macros to STR_ (This used to be commit 95c9e4e0ba8f37f565aaf136f41eb76489441ff7)
2001-03-05smb.h: add one error code for no such printer jobRichard Sharpe1-0/+1
libsmbclient.c: fix problems with return codes on smbc_unlink_print_job (This used to be commit 7557f9145ccdced3fcebdd20e1eb6fc5a27abda2)
2001-02-23include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.Jeremy Allison1-1/+4
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. (This used to be commit 71029da7dd74eb91dd6953752bdf238f319d985d)
2001-01-23Changes from APPLIANCE_HEAD:David O'Neill1-0/+1
source/rpc_server/srv_spoolss_nt.c - add an access check to _spoolss_deleteprinter() to stop random users and passers by from deleting printers. source/lib/messages.c - converted global msg_all struct to a local in message_send_all() function. source/include/smb.h - added a success error code to the spoolss return codes. source/include/proto.h source/param/loadparm.c source/printing/printing.c - Added new parameter "total print jobs" to limit the total number of print jobs across all queues. Currently individual queues are limited by "max print jobs". (This used to be commit 02f154e729b0e8465d3e1e2ac794e6ab3844ce57)
2000-12-20implemented a much nicer name_status() interface. It now returns aAndrew Tridgell1-0/+10
list of structures rather than the dodgy parsing code we had before this also gets smbw working correctly with no initial workgroup (using name_status_find on __MSBROWSE__ returns) (This used to be commit f2be88a8738a39ca5c98936edb7537cd701348a1)
2000-12-06Cause smbd to use the new posix_acls code, not the old unix_acls code.Jeremy Allison1-0/+1
Currently does exactly the same thing (returns ACLs the same way). This code is written to try and get a POSIX ACL via the abstract sys_XX interface, then fall back to providing a UNIX based ACL if the calls fail. Seems to work. Next step is to add a --with-posix-acls to configure.in and then check on a POSIX ACL system that a complex ACL is returned correctly as an NT ACL. Note that the ACL set (a more complex problem) is not addressed yet. Jeremy. (This used to be commit 4339e20202a876dbadc07980b731f711463b7299)
2000-12-04pass the desired access into cli_nt_create()Andrew Tridgell1-0/+3
(This used to be commit a2d07994e0376a8d530d262573c96710bdff2236)
2000-11-28include/dlinklist.h: Added '{' '}' around DLIST_PROMOTE so it can be used as ↵Jeremy Allison1-1/+3
a single statement after an 'if'. Tracking this down took 4 hours from my life and ANDREW I WANT THEM BACK !!!!! :-). include/smb.h smbd/password.c: Fixed the bug veritas reported with realloc of the validated_users array growing without bounds. This is now a linked list as god (Andrew) intended :-). Jeremy. (This used to be commit 346f2f9206b9b4ed123e2a61c0a48de630397b8a)
2000-11-21Another large patch for the passdb rewrite.Gerald Carter1-65/+3
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-16Fix from Jim McDonough @ IBM for OS/2 clients.Jeremy Allison1-0/+1
Jeremy. (This used to be commit f571e1efd01c7b1b500a833df3bd074a8c4c65ec)
2000-11-14Changes from APPLIANCE_HEAD:David O'Neill1-1/+6
- merged Tim's vlp (virtual lp) test program. Enable it with -DDEVELOPER or by using ./configure.developer (source/include/smb.h source/configure.developer source/printing/lpq_parse.c source/param/loadparm.c testsuite/printing/.cvsignore testsuite/printing/Makefile.vlp testsuite/printing/vlp.c) (This used to be commit fbcf83140da1823e74f63227f0a95d07c6e76764)
2000-11-13Large commit which restructures the local password storage API.Gerald Carter1-54/+48
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-10-11Fix for growing printing.tdb by adding check on job creation.Jeremy Allison1-0/+1
This also updates the printing.tdb db version to 2. Jeremy. (This used to be commit 13395514c632341e7be36eb9589011bb0949b075)