summaryrefslogtreecommitdiffstats
path: root/source3/script/mkproto.awk
Commit message (Collapse)AuthorAgeFilesLines
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-1/+1
| | | | | | | | | | | | | | | | | 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)
* The big character set handling changeover!Andrew Tridgell2001-07-041-1/+1
| | | | | | | | 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)
* initial support for paramter type P_LISTSimo Sorce2001-06-201-0/+10
| | | | | | | 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)
* Cosmetic changes in make proto output.Tim Potter2001-05-141-1/+1
| | | | (This used to be commit 858290d63b8e4300f2a1a334675566beb6881993)
* - added test for vasprintfAndrew Tridgell2001-04-281-2/+2
| | | | | | | | | - 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)
* Cause smbd to use the new posix_acls code, not the old unix_acls code.Jeremy Allison2000-12-061-1/+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)
* Large commit which restructures the local password storage API.Gerald Carter2000-11-131-2/+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)
* Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison2000-08-041-1/+1
| | | | | | | | | Added a become_root()/unbecome_root() (push/pop security context) around the initgroups() call to ensure it would succeed. Hmmm - I wonder if this call being done as non-root might explain any "group access" bugs we've had in the past.... Jeremy. (This used to be commit 06a65972e872f37d88b84f22ea714feebd38f6c0)
* grab functions that return RPC_HND_NODE (declaredGerald Carter2000-07-181-1/+1
| | | | | | | | | in include/util_list.h) -- jerry (This used to be commit ccebd70df2c096de1b183ae072c2c720e2277c6f)
* Make prototypes for functions returning an enum nss_status.Tim Potter2000-07-061-1/+1
| | | | (This used to be commit dac9c934ac3932fb9870417e8f712a880dd25e45)
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-031-2/+6
| | | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry (This used to be commit 269051aa0c52728278a1d290148564f11cf7f189)
* added a NET_USER_INFO_3 struct to user_struct.Luke Leighton2000-06-081-2/+2
| | | | | register_vuid fills it with constructed info. (This used to be commit b1889e4334012b1b2caa604b859da4271509fc87)
* More stuff I cvan't afford to lose. I'm realizing how dependent I amJeremy Allison2000-06-011-1/+1
| | | | | | on this bloody CVS link.... Jeremy. (This used to be commit 864e7bde0e804edbb2425b9c4c7ff271553f8169)
* the beginnings of a new scheme I've working on to allow an easierAndrew Tridgell2000-05-091-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | head/tng merge. It goes something like this: - headers from tng get copied over one at a time - the old headers get renamed to *_old.h - server side code that used the old headers gets a #define OLD_NTDOMAIN 1 #undef OLD_NTDOMAIN at the start and end of the code - mkproto.awk recognises these special defines and does magic stuff so that each .c file sees the right headers - we start moving the rpc client libraries from tng to head. if this goes OK then, in theory, we should be able to move the client side rpc code from tng to head without disturbing the existing head server side code. Then when that works we can consider merging the server side. it remains to be seen if this scheme will work. So far I've moved rpc_samr.h and don't seem to have broken anything. Note this this is still a very delicate operation, as at every step of the way I want to keep head fully functional. Please don't take part unless you discuss it with me first. (This used to be commit f76c037255a6a79d11bec65e863e009a41a4f0fd)
* Added hash-based stat cache code from Ying Chen.Jeremy Allison2000-01-261-1/+1
| | | | | Jeremy. (This used to be commit b62a1bd6328f5894ae1a2fef3ef6fc66304ade52)
* implemented talloc() as described on samba-technical. This fixes theAndrew Tridgell2000-01-051-1/+1
| | | | | | | | lp_string() bug properly. we still need to add lp_talloc_free() calls in all the main event loops, I've only put it in smbd and nmbd thus far. (This used to be commit aa7f81552540f5dca2c146f5edd805611d5b390f)
* First cut at unicode sys_xx functions. Now to start moving upwards.....Jeremy Allison1999-12-221-1/+1
| | | | | Jeremy. (This used to be commit b5eb009cc3cfd1adc044e91911d59acdb54c30cb)
* first cut at using the tdb code for the connections structure, theAndrew Tridgell1999-12-211-0/+4
| | | | | | SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago! (This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-11/+3
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* preparation for doing a spoolss enum jobs command. had to rewriteLuke Leighton1999-11-081-0/+4
| | | | | spoolss_enumjobs parsing code to do read / writes not just writes. (This used to be commit bc659a09f9103eee9616279e27fafacf89dcd9b9)
* added rpcclient spoolenum command. enumerates printers.Luke Leighton1999-11-061-0/+4
| | | | | | | spoolss_r_io_enumprinters doesn't decode strings correctly as printer_info_1/2 code has only been written to write structures, not read them. (This used to be commit 135eaa977385cdd5f572a51f654f14d893347d7b)
* three types of array-creation / array-deletion functions:Luke Leighton1999-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | char* UNISTR2* SID* decided to create a higher-order function set, add_item_to_array() free_item_array(). higher-order support routines needed to add a new type: type* item_dup(const type*) void item_free(type*) of course, strdup() and free() are perfect, pre-existing examples of such functions, used in the implementation of add_chars_to_array() and free_char_array(). sid_dup() and free() work for the add_sids_to_array() and free_sid_array() implementations. use unistr2_dup() and created unistr2_free() because the functionality behind these may change into something horrible, like [horror] dynamic memory allocation of the UNISTR2 character array. argh!!!! jean-francois, this function set implements what we talked about over... a year ago, now :-) (This used to be commit a80ea2eb47d298095eb6e5b0455309daa3a631cb)
* Modified to cope with functions that return a const something.Tim Potter1999-06-131-1/+1
| | | | (This used to be commit 56738ec5263edba23d8337dde27e7da45ec06490)
* added jeremy's new c++-like code for parsing of security descriptors.Luke Leighton1999-02-231-1/+1
| | | | (This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8)
* A while back, Andrew and I talked about making the debug parsing code aChristopher R. Hertel1998-12-161-1/+1
| | | | | | | | | | | | | | | better "fit" with other Samba code. This is a small first step toward doing what (I think) we agreed to do. I've moved the key function from ubiqx/debugparse.c into lib/debug.c. I have also moved the enum from ubiqx/debugparse.h into the debug section in smb.h. The next thing to do is to get debug2html added into the Makefile.in so that it is always produced when compiling the suite. Chris -)----- (This used to be commit 782474f41e0c2bc0b1f098758a3e5cb44e87d8b1)
* unix instance of group database APILuke Leighton1998-11-231-1/+1
| | | | (This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078)
* LOCAL_GRP and DOMAIN_GRP are return typesLuke Leighton1998-11-131-0/+4
| | | | (This used to be commit 887063e421d476fe2c2f6809750af3bfb020a85c)
* support a few more function types (like ino_t and off_t)Andrew Tridgell1998-10-041-1/+1
| | | | (This used to be commit 758048f1e17db70daa4cd169d5c9b833f94279f4)
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-2/+20
| | | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09)
* Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison1998-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
* nmbd/nmbd_winsserver.c: Fixed printf style warning.Jeremy Allison1998-09-181-1/+1
| | | | | | script/mkproto.awk: Added SMB_BIG_UINT. Jeremy. (This used to be commit c22c40f0caa7d6a9e8120e6415fa728db708db3e)
* Added ssize_t to configure code.Jeremy Allison1998-09-111-1/+1
| | | | | | | | | | | | Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy. (This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a)
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
* moved connection_struct handling code into smbd/conn.c and changed itAndrew Tridgell1998-08-171-1/+1
| | | | | to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9)
* some cleanups from the conversion of Pipes[] to a linked list. I alsoAndrew Tridgell1998-08-171-1/+1
| | | | | | | | | removed most cases where a pnum is used and substituted a pipes_struct*. in files.c I added a offset of 0x1000 to all file handles on the wire. This makes it much less likely that bad parsing will give us the wrong field. (This used to be commit 8bc2627ff28d340db65bfa017daca2dc291d5ef7)
* this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1998-08-151-1/+1
| | | | | | | | in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-1/+1
| | | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
* Added code to generateChristopher R. Hertel1998-06-081-0/+6
| | | | | | | | | | | | | | | #ifndef _PROTO_H_ #define _PROTO_H_ : : #endif /* _PROTO_H_ */ in the appropriate places. This required that I add an END rule. I generated a new proto.h and diff'ed it against the previous. There were no differences except for the added lines. Chris -)----- (This used to be commit 6d4d0dc7e65f946f09d127969ccbb4b51dfd6a4e)
* Makefile:Luke Leighton1998-05-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added nisppass.c and NISPLUS_FLAGS includes.h: - renamed USE_LDAP to USE_LDAP_DB. renamed NISPLUS to USE_NISPLUS_DB. added default define of USE_SMBPASS_DB. - removed ldap headers: they are local only to ldap.c ldap.c : - made all ldap-specific functions static. - added dummy sam21 functions loadparm.c : - renamed NISPLUS to NISPLUS_HOME mkproto.awk - commented out ldap-specific #ifdef generation code: it's not needed now that ldap-specific functions in ldap.c are static nisppass.c : - first attempt at an add function from (This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1)
* ldap back-end database developmentLuke Leighton1998-05-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile: created PASSBD_OBJ group includes.h: added #ifdef USE_LDAP to #include <ldap> headers ldap.c: - renamed "_machine" to "_trust" everywhere. - added sam_passwd support routines - removed get_ldappwd_entry function: replaced with get_sampwd_entry - removed getldappwnam/uid: replaced with getsampwnam/uid - other messing about bits which are probably going to annoy the hell out of jean-francois (sorry!) mkproto.awk: - added stuff to wrap ldap.c protos with #ifdef USE_LDAP - added uid_t and gid_t return results to the prototype generation passdb.c: - created getsam21pwent, add_sam21pwd_entry, mod_sam21pwd_entry. - modified getsampwnam/uid and created getsam21pwnam/rid functions to replace the local get_smbpwd_entry() and get_ldappwd_entry() functions, which jeremy didn't like anyway because they were dual-purpose. - added utility routines which are or may be useful to all the password database routines. password.c: - renamed "machine_" to "trust_" everywhere. smbpass.c: - removed get_smbpwd_entry function: replaced it with get_sampwd_entry functions in passdb.c - moved code that decoded acct_ctrl into passdb.c - moved encode_acct_ctrl into passdb.c - removed getsmbpwnam/uid: replaced with getsampwnam/uid - renamed "machine_" to "trust_" everywhere. smbpasswd.c: - renamed "machine_" to "trust_" everywhere. util.c: - moved gethexpwd function into passdb.c lib/rpc/server/srv_util.c: - moved user_rid_to_uid, group_rid_to_rid etc etc into passdb.c (This used to be commit 673ab50c4c2c25db355d90efde3a6bfbb4d8369e)
* Removed unneeded proto symbol.Jeremy Allison1998-04-091-1/+1
| | | | | Jeremy. (This used to be commit 6ed3de711858fde6fa8085e9439aae3bbf6ecda1)
* "For I have laboured mightily on Luke's code, and hath brokenJeremy Allison1998-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy. (This used to be commit 118ba4d77a33248e762a2cf843fb7cbc906ee6e7)
* Makefile: Changed proto: target to not include c files not used currently.Jeremy Allison1997-09-191-1/+1
| | | | | | | | | | | | Caused proto.h to be from a sorted list of C files. arcfour.h: Added prototypes. client.c: Added username%password in environment patch from John Blair <jdblair@frodo.tucc.uab.edu> loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] mkproto.awk: Added arc4_key type. proto.h: Updated & sorted. Jeremy (jallison@whistle.com) (This used to be commit 97ed4fea67095dfb83227e7b5fffc236ff277e02)
* Fixed up determination of client type for PROTOCOL_NT1. Uses clientJeremy Allison1997-09-041-1/+1
| | | | | | | capabilities bits in session_setup_and_X to decide. Made remote_arch an enum as well as a string, for easier use. Jeremy (jallison@whistle.com) (This used to be commit 99080705a2d0adcb25e1eecbe517a2fac2779baa)
* added a new type to mkproto.awk so it can handle shmem.cAndrew Tridgell1997-08-281-1/+1
| | | | | | in general if you add a new type that is returned by a non-static function then just add it to the list of known types in mkproto.awk (This used to be commit 1d4ce07435f3d6dac41a2616a044bcd441dbaced)
* - added FAST_SHARE_MODES codeAndrew Tridgell1996-08-151-1/+1
| | | | | - added some named pipe code from Jim (This used to be commit c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9)
* luke's first attempt at using cvsSamba Release Account1996-06-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accidentally updated the Makefile updated the name database structure (again!). this time, there is one name database per local interface. there is also a pseudo-interface on ip 255.255.255.255. its purpose is to store WINS name entries. all the local interface name databases store SELF names only. the WINS name database stores non-special browser names. added wins.dat file: records WINS entries in ascii format. this is reloaded when nmbd restarts. added repeating code for response packets. timer is in seconds only at the moment. updated the response queue code to deal with samba registering with a WINS server a bit better (added more cases when a response isn't received). tidied up the response packet processing code and expire_response_queue() code. added cross references between response received and await-response expired code. added over-zealous code that checks all machines that register with samba as a WINS server (every 10 minutes i think): to see whether they are still alive or not (see rfc1001.txt) bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as DNSFAIL, even though the machine may come back up and REGISTER. removed update_from_reg() function. it's not necessary, and it does too much. added code that announces on each local interface samba's ttl as zero and servertype as zero when nmbd is kill -TERMed first attempt at putting the first functionality of samba browsing back in (remote subnets should have samba appear in a workgroup specified through the lmhosts file) lots of other miscellaneous tidying up / chopping about. (This used to be commit 7e8c60cfe54060860e5ce20b1c3b8ec6aa5c54da)
* Added source filename to give crude indexSamba Release Account1996-06-171-0/+9
| | | | | Dan 17 June 1996 (This used to be commit 5a72a6c8dfe3a0898db514c35a9d704c3627c41d)
* got rid of a lot of redundent header files as we now globally generateAndrew Tridgell1996-06-101-0/+39
| | | | | | prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes (This used to be commit b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc)
* add dummy quotas fnAndrew Tridgell1996-06-041-1/+1
| | | | | fix typo in reply to backup lists (This used to be commit bc4a2994377ab078d3d1a900f79fda9dfe4d0e6a)