summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
AgeCommit message (Collapse)AuthorFilesLines
2001-11-08Added more define bits. Fixed error in vol attributes.Jeremy Allison1-3/+6
Jeremy. (This used to be commit eba8204bfadb176fafb686a35295a09f0f35b894)
2001-11-04a big one:Simo Sorce1-0/+10
- old mangle code has gone, the new one based on tdb seem resonably ok probably the valid.dat table need to be updated to treat wild chars as invalid ones (work ok without it) - a LOT of new string manipulation function for unicode, they are somewhat tested but a review would not be bad - some new function I will need for the new unix_convert function I'm writing, this will be renamed filename_convert and use only unicode strings. - charconv, I attached a comment, if someone wnat to look if I'm right or just was hacking to late in the night to make a sane one :) of course any bug is my responsibility an will be pleased to see patches if you find any. :-) Simo. (This used to be commit ee19f7efb6ea9216fc91cf112ac1afa691983e9d)
2001-11-03Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison1-0/+3
Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy. (This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)
2001-10-31This is a farily large patch (3300 lines) and reworks most of the AuthRewriteAndrew Bartlett1-2/+2
code. In particular this assists tpot in some of his work, becouse it provides the connection between the authenticaion and the vuid generation. Major Changes: - Fully malloc'ed structures. - Massive rework of the code so that all structures are made and destroyed using malloc and free, rather than hanging around on the stack. - SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them to be declared 'invalid' without the chance that people might get ROOT by default. - kill off some of the "DOMAIN\user" lookups. These can be readded at a more appropriate place (probably domain_client_validate.c) in the future. They don't belong in session setups. - Massive introduction of DATA_BLOB structures, particularly for passwords. - Use NTLMSSP flags to tell the backend what its getting, rather than magic lenghths. - Fix winbind back up again, but tpot is redoing this soon anyway. - Abstract much of the work in srv_netlog_nt back into auth helper functions. This is a LARGE change, and any assistance is testing it is appriciated. Domain logons are still broken (as far as I can tell) but other functionality seems intact. Needs testing with a wide variety of MS clients. Andrew Bartlett (This used to be commit f70fb819b2f57bd57232b51808345e2319d52f6c)
2001-10-30Fix up smbpasswd -e/-d so that it doesn't change the password under you anyAndrew Bartlett1-0/+1
more. (Previously it set them to 'XXXX' or similar when only the flags were being changed - a bug I must have introduced when I reworked the passdb end of things a few weeks back.) Adds a new local flag: LOCAL_SET_PASSWORD to specify that the password is actually to be changed. Andrew Bartlett (This used to be commit cea6b6cb228c7e1f0c2d45951590e0d8fb8b315c)
2001-10-29This commit is number 2 of 4.Andrew Bartlett1-7/+0
In particular this commit focuses on: The guts of the moving about inside passdb. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes allow for the introduction of a large dose of 'const' to 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 passdb/ - Kill off disp_info stuff, it isn't used any more - Kill off support for writing to the old smbpasswd format, it isn't relevent to Samba 3.0 - Move around and modify the pdb_...() helper functions, adding one that sets the last changed time to 'now' and that sets the must change time appropriately. - Remove the ugly forced update of the LCT- value in pdb_smbpasswd. - Remove the implicit modification of the ACB flags when both NT and LM passwords are set. - Removed substation in pdb_getsampwnam output, as a single password change will render them inoperable in any case (they will be substituted and stored) - Added a default RID to the init_sam_from_pw() function, based on our rid algorithm. - Added checks that an smbpasswd stored user has a uid-based RID. - Fail to store tdb based users without a RID lib/ - Change the substituion code to use global_myname if there is no connection (and therefore no called name) at the present time. (This used to be commit 8f607810eb24ed1157bbd2e896c2c167bc34d986)
2001-10-20Converted a bunch of 0x85 constants to SMBkeepalive.Tim Potter1-0/+1
(This used to be commit b16a15a13ed7d267c6366abaeeb3ccafa5776f5e)
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)