summaryrefslogtreecommitdiff
path: root/source3/rpc_server
AgeCommit message (Collapse)AuthorFilesLines
2000-05-12added spool_io_printer_driver_info_level_6()Andrew Tridgell1-4/+26
thsi function and the associated header structure were autogenerated using a little awk based code geerator I wroe ths evening. I'll commit that next ... (This used to be commit 974813f0d4afb6c14ed27c48ab24b19932557f9f)
2000-05-12fixed two uninitialised variablesAndrew Tridgell1-2/+1
(This used to be commit eefb36f130f79f2f2c6cfb58c1646aa6ce4303be)
2000-05-10lib/util_unistr.c:Jeremy Allison1-2/+2
libsmb/clilist.c: rpc_server/srv_spoolss_nt.c: smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion. msdfs/msdfs.c: Removed stub unistr_to_dos. libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and don't add any security. Jeremy. (This used to be commit 1ed146467e764e6a81d8f78cd58fb5765ebf5d21)
2000-05-10more merging voodooAndrew Tridgell9-1/+27
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-05-09the beginnings of a new scheme I've working on to allow an easierAndrew Tridgell2-0/+8
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)
2000-05-04rpc_server/srv_lsa.c: Bring into sync with 2.0.x.Jeremy Allison2-15/+25
rpc_server/srv_pipe_hnd.c: Bring into sync with 2.0.x. smbd/blocking.c: Improve blocking debug reporting. utils/torture.c: Added check for NT locking bug. Jeremy. (This used to be commit e8ff6d3fb5537c39611a5784bf7216ae812acd27)
2000-05-04 - use full_name instead of real_nameAndrew Tridgell3-2/+4
- got rid of guest map code in lpq parser (This used to be commit 8e53f781d3cf6a7007764916a0d8e8f1abea1f66)
2000-05-02added support for deleting printers into the spoolss systemAndrew Tridgell2-0/+63
(This used to be commit e72a5718537b84409fc20ff21951b1d1ab24d97f)
2000-05-02split the username in the vuser structure into a separateAndrew Tridgell2-3/+3
userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username. (This used to be commit ee8546342d5be90e730372b985710d764564b124)
2000-05-02fixed a memory leakAndrew Tridgell1-0/+2
(This used to be commit d4743ec0be419565c805fbc5ba2680c6ad5fe36d)
2000-05-02Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison3-4/+4
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
2000-04-30fix handing of ascii_to_unistrAndrew Tridgell1-19/+19
(This used to be commit 385b1844b60beeb9db5f412a452816444e25cb83)
2000-04-28Added info level 1005 to netsharegetinfo (is the share a DFS root)Shirish Kalele1-0/+17
Added dfs_server announcement in set_default_server_announce_type() (This used to be commit 99d07e13520b04d99999938d259d56fa65c8a8ea)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell4-4/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-25fixed a memory leak of devmode in spoolssAndrew Tridgell1-0/+3
this stuff is screaming out for talloc() rather than malloc/free (This used to be commit e9576124cbe8322ed7bee9f4e72b5d1753ee0bac)
2000-04-23more pstring/fstring errors found by insureAndrew Tridgell1-15/+16
(This used to be commit ba1931bb6596b538549e712cb8898b1ed19f5adc)
2000-04-23another fstring/pstring fixAndrew Tridgell1-1/+1
(This used to be commit 91ed7d8ffe8208d06191c64f5332954ec6bf75da)
2000-04-23fixed another spoolss memory leakAndrew Tridgell2-2/+2
I am falling in love with insure - it is finding _lots_ of memory problems (This used to be commit d9b4076293a4d37e1558ad63a3f522385ee3e521)
2000-04-23we can't pass a fstring to a routine expecting a pstringAndrew Tridgell1-1/+1
(This used to be commit 8af70f288723e4597bc8639fc0cbec44af2e50c7)
2000-04-23fixed a prs memory leak (weren't freeing input buffer)Andrew Tridgell1-0/+1
(This used to be commit be7186b0dd2779fc9f98b4c9f77874ef3ded37d6)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-2/+6
new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-18Sync up with 2.0.7 w.r.t. guest users.Jeremy Allison1-3/+3
Jeremy. (This used to be commit 8a99d824c0e9a43c8a8c81140f8c9005c7e2621a)
2000-04-16got rid of FILE* in the unix name mapping codeAndrew Tridgell1-8/+8
(This used to be commit 92f85cef8b4c283374edb726ff0b4999a2000b2a)
2000-04-16- put the job status in english not french!Andrew Tridgell1-7/+49
- add helper fns to change from internal status codes to nt spoolss codes (This used to be commit 917c4814fe076cc38b1becf7d219f2437cba6e60)
2000-04-16JF and Jeremy - please have a look at what I did to the spoolssAndrew Tridgell1-183/+59
code. It now uses the new printing backend. ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places. (This used to be commit 2df82862c061cca5644f5f69146c97302ccb42d5)
2000-04-14Ensure sign&seal work. Data len must have RPC_HEADER_LEN removed, butJeremy Allison1-1/+5
offset should not (rpc header already consumed). This fix does not affect tng. Jeremy. (This used to be commit 018ec4fdd937994824f53cb956cea1ade9690f97)
2000-04-11finally got sick of the "extern int Client" code and the stupidAndrew Tridgell1-1/+1
assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
2000-04-10added checks to open both \\server\printer and \\server\share.Jean-François Micouleau1-3/+44
it doesn't work, the getprinter level 0 reply is wrong... J.F. (This used to be commit a7b09e3e11dc66779ee50524ebe1f6687ec744c6)
2000-04-06Modified interfaces and added checks around *all* *alloc callsJeremy Allison2-60/+174
so that errors are returned on memory allocation failure. Jeremy. (This used to be commit 9a118cd4a2b03146b341eeffb62144a2d29b574c)
2000-04-06filled the architecture table (useless for the moment).Jean-François Micouleau1-18/+37
fixed GetJob. J.F. (This used to be commit 3fea49e1d896987c54187cb326607284810fcb0d)
2000-04-05changed all the status code to ERROR_xxx instead of NT_STATUS_xx which areJean-François Micouleau1-88/+74
wrong in the spoolss case. fxed a bug in the job notify code (that's the polite answer), the truth is different: there is a bug in the NT spooler service, including SP6a and NT2K. changed the default lpcommand in the LPRNG case. J.F. (This used to be commit 396f73c11b29a47650b3243fef0825252a3cef9b)
2000-04-04Change to vfs API. POSIX states fsync should return an int, not a void.Jeremy Allison1-2/+0
Jeremy. (This used to be commit 6c442d68afae4140e28b770343a900b5ce510b4a)
2000-04-04Snuck in some whitespace cleanup while I was visiting these files. (-:Tim Potter3-6/+0
(This used to be commit f249dc041f3f3bdb1adaa41271236ffdb2447475)
2000-04-04Removed unused parameter vuid from rpc_server api_* calls. For the very fewTim Potter8-320/+296
functions that need to access the vuid, it can be obtained from the current_user global. Did some whitespace cleanup. (This used to be commit 738b307bd7053ede369431da7b1349befaa523d9)
2000-03-31IRIX include fixes.Jeremy Allison1-0/+5
Jeremy. (This used to be commit 3a39acd3535647b0f28f51eea29573d5cb1eb9be)
2000-03-29split addprinterex in preparation for level 1 support and to stop itJean-François Micouleau1-8/+28
coredump. J.F. (This used to be commit aea47dee7d85310f35309ecfa91d0b87e632a33f)
2000-03-29rewrote getprinterdriver level 3, now correctly handle the dependentJean-François Micouleau1-74/+95
files. A number of memleak fixed some error return values fixed. J.F. (This used to be commit c212fbe009fe556d5329b5d7106159cf21402d82)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison9-264/+1
include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-22disabled the getgrent() code recently added that returns all unix groupsLuke Leighton1-0/+17
as NT aliases. no allowance is made for possible clashes with some unix groups that may be mapped to NT groups, not NT aliases. it is not the place of this code to make decisions about which unix groups should be mapped to NT aliases or NT groups, or in fact whether unix groups exist at all (e.g "appliance" mode). please could the person who wrote this code contact me and i will outline the architecture and design issues that you need to be aware of when working in this area: i need your skills and ability -- applied in the right places. thank you. (This used to be commit 67d9b3733f7f3ffab0ff6e78de7638fb469195e6)
2000-03-22disabled code from HP that replaced get_sampwd_entries() withLuke Leighton1-1/+26
get_passwd_entries(). get_sampwd_entries() calls the generic SAM pwdb API, whereas get_passwd_entries() calls the Unix database explicitly. this will result in LDAP, MYSQL, NISPLUS and any other future modules (e.g "appliance" mode SAM database) failing to operate correctly. i know what problem was attempted to be fixed, here, but this is not the right place to attempt to fix it. (This used to be commit 04fa6a02739671fa02b531ae47e5d24c54753331)
2000-03-22added the following message to all dce/rpc client/server code, exceptLuke Leighton9-0/+221
the spoolss code (it's cut from TNG) and the smb-dce/rpc interface code that jeremy has been working up to TNG-functionality. i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE, because it is intolerable that potentially good modifications be made to code that is going to be thrown away, and people waste their time fixing bugs and adding enhancements that have already been carried out already, up to two years ago in the TNG branch. /* * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY, * INCOMPLETE. PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH. * * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY. * * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH * * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG. * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT * MAY BE LOST. * * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST. * * THANK YOU. * * lkcl@samba.org */ (This used to be commit cfaea90529be222f8df0e20a7ca1289f99c29e09)
2000-03-21Added preliminary user list code from HP. Needs to be made dynamicJeremy Allison1-20/+252
and backended with a tdb database so the list can be shared between multiple smbds. ToDO. Jermey. (This used to be commit 171222ce22595743a052e5c3d4428ce916d7c345)
2000-03-16fix a bug in enumprinterdriversJean-François Micouleau1-6/+14
J.F. (This used to be commit a8d04c26da601cb97e66c27c7ad21dd672fcec2d)
2000-03-13oops ! forgot smb.h in last commitJean-François Micouleau2-2/+14
added info level 1 parsing code for addprinter(ex) J.F. (This used to be commit 4847f7b17b2d23e4efd4e7cae6bfcfc2319b9409)
2000-03-13small fix for addprinterex at level 2Jean-François Micouleau1-10/+8
I have some network dumps at level 1, but quoting MSDN: "Level [in] Specifies the version of the structure to which pPrinter points. This value must be 2." I like NT so much :-) J.F. (This used to be commit fbf40c6a9140a27e773d59eaf056c9e25659d9b8)
2000-03-13parse correctly getprinterdriver2Jean-François Micouleau2-44/+46
found a stupid bug in enumprinters fixed some memleaks found a coredump in enumprinterdata getprinterdriverdir responds correctly now. J.F. (This used to be commit 07f2e194ba61e72320636fb7e5d0f041e255868b)
2000-03-11You *must* use O_EXCL when using mktemp (security issue).Jeremy Allison1-1/+1
Glad this code never shipped :-). This is not a problem in 2.0.x. Jeremy. (This used to be commit a0c302f4d03ab07d697115fa8520d0cb0b2ba616)
2000-03-10Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes ↵Jeremy Allison3-60/+118
-Wpointer-arith -Wcast-qual Partially implemented rpc daemon redirect (needs more work). Jeremy. (This used to be commit a462191698fa589ceac4afd14c652adf699eccad)
2000-03-10getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau1-121/+193
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
2000-03-10removed unused variableJean-François Micouleau1-1/+0
J.F. (This used to be commit e2557ae5515ce30d0341ef7785cc4380266d4c94)