summaryrefslogtreecommitdiffstats
path: root/source
Commit message (Collapse)AuthorAgeFilesLines
...
* commas in the wrong places...Luke Leighton1997-10-231-2/+2
|
* missed nmbsync.c when adding setup count and setup pointer arguments toLuke Leighton1997-10-232-12/+22
| | | | | | | | | | cli_call_api(). sorting this for jeremy. there is a discrepancy between the client.c list_servers() and the nmbsync.c add_info() calls to cli_call_api() - one has an mdrcount of 1024, the other of zero. i don't know what difference this makes.
* general sorting out, from crashes generated by do_lsa_req_chal() in client.cLuke Leighton1997-10-238-75/+105
| | | | | | | | | | | trying to set up the data parameters etc and not understanding what's going on. in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received (and in this instance, generated by do_lsa_req_chal()). and then noticed that it's two bytes out. but i don't know how to do "byte parameters" and it's not the same format as the LSA_REQCHAL received from nt workstations. agh!
* playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)Luke Leighton1997-10-236-47/+146
| | | | and then send a LSA_REQ_CHAL down it.
* client.c :Luke Leighton1997-10-222-11/+26
| | | | | | | | send to \PIPE\ not \PIPE\NETLOGON. ipc.c : fstring name not being bzero'd caused problems when calling named_pipe().
* Makefile client.c :Luke Leighton1997-10-229-144/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding start of undocumented options to do NT domain logons, client-side. starting with LSA_REQCHAL. the code here happily crashes smbd: i'll investigate this further... :-) smbparse.c pipeutil.c lsaparse.c : moved some of the common make_xxxx() functions out of pipeutil.c so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit together. makes sense, really... added a make_q_req_chal() function. restructured make_rpc_reply() and called it make_rpc_hdr(). created functions create_rpc_reply() and create_rpc_response(). pipenetlog.c pipentlsa.c pipesrvsvc.c calling new create_rpc_reply() function instead of old make_rpc_reply(). proto.h : usual. smb.h: added enum for RPC_PACKET_TYPE
* Makefile client.c clientutil.c clitar.c nmbsync.c :Luke Leighton1997-10-227-1379/+422
| | | | | | | | | | | | | | | | | | | | | redid the split that i did a year ago, taking the functions in client.c out into clientutil.c. guess what? we could now do encrypted password NetServerEnum2 calls in nmbd, if we wanted to. i can now use cli_call_api() to send to different pipes. i hope. pipenetlog.c: allow adding to users group _and_ to admin group. if adding to guest group, don't allow adding to users or admin as well. smb.h : added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...) proto.h : usual.
* loadparm.c :Luke Leighton1997-10-229-110/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added "domain other sids" parameter pipenetlog.c : using "domain other sids" parameter in SAM Logon response. using new name_to_rid() function for r_uid and r_gid. pipentlsa.c : minor mods to do with new name_to_rid() function. pipesrvsvc.c : in the "net share enum" response, allocate some more space for the buffer. there can be only 32 share entries in the response anyway. this needs to be dealt with. pipeutil.c : modified name_to_rid() function to use new parameters "domain admin users" and "domain guest users", but will otherwise do unix uid + 1000. moved make_dom_gids() here. proto.h: the usual. smb.h smbparse.c : renamed sid_no to sid_rev_num in DOM_SID, and gid to r_gid in DOM_GID. util.c : moved make_dom_gids() from here. created char *unistrn2(uint16* uni_buffer, int max_len)
* shared memory code cleanups (partly preparing for a possible sysVAndrew Tridgell1997-10-224-56/+68
| | | | shared memory implementation)
* Implemented asynchronous DNS lookups in nmbd.Andrew Tridgell1997-10-228-107/+340
| | | | | | | | | | | | | | | | | | | | | I realised this afternoon just how easy it is to add this, so I thought I'd implement it while the idea was fresh. nmbd forks at startup and uses a pipe to talk to its child. The child does the DNS lookups and the file descriptor of the child is added to the main select loop. While I was doing this I discovered a bug in nmbd that explains why the dns proxy option has been so expensive. The DNS cache entries in the WINS list were never being checked, which means we always did a DNS lookup even if we have done it before and it is in cache. I'm sure this used to work (I tested the DNS cache when I added it) so someone broke it :-( Anyway, the async DNS gets rid of the problem completely. I'll commit just the fix to the DNS cache bug to the 1.9.17 tree. You can disable async DNS by adding -DSYNC_DNS to the compile flags.
* don't send any statistics in the node status replyAndrew Tridgell1997-10-221-6/+2
|
* WHATSNEW.txt: Updated for alpha3.Jeremy Allison1997-10-212-3/+3
| | | | | | | server.c: int16 -> uint16 fix for port comparisons in oplock code. Needed for Solaris. version.h: Updated to alpha3. Jeremy (jallison@whistle.com)
* WHATSNEW.txt: Preparing for 1.9.18alpha2 release.Jeremy Allison1997-10-211-1/+1
| | | | | | smb.conf.5: Added 'bind interfaces only' parameter. version.h: Updated to 1.9.18alpha2. Jeremy (jallison@whistle.com)
* chgpasswd.c:Jeremy Allison1997-10-213-73/+154
| | | | | | | includes.h: SCO changes. server.c: Added code in open_sockets to allow 'bind interfaces only' to work as documented. Jeremy (jallison@whistle.com)
* loadparm.c :Luke Leighton1997-10-216-4/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | added "domain admin users" parameter added "domain guest users" parameter these two complement the "domain groups" parameter. the "domain groups" parameter should be for your own groups, and well-known aliases. util.c : added ability to do "domain groups = power_users admin_users backup_ops" which are well-known RID aliases, not well-known RID groups. pipenetlog.c : combine the "domain admin users"; "domain guest users" and "domain groups" parameters to give an array of RID groups to include in the SAM Logon response. ipc.c smb.h : moved REALLOC() into smb.h added RID #defines. proto.h: usual.
* damn, I spelt EACCES wrong.Andrew Tridgell1997-10-211-1/+1
| | | | actually it's wrong in the linux man page for utime ...
* check for EPERM or EACCESS in file_utime()Andrew Tridgell1997-10-211-1/+6
|
* don't check lp_alternate_permissions() in the new utime workaroundAndrew Tridgell1997-10-211-14/+12
| | | | | | code. lp_alternate_permissions() is intended only to affect the display of file permissions, not what you can actually do with the files.
* fix the order of become_uid() and become_gid() in become_root(). ThisAndrew Tridgell1997-10-212-9/+2
| | | | | | was a harmless bug but left log entries code cleanup in reply_lanman2()
* prototype updatesAndrew Tridgell1997-10-211-10/+25
|
* some cleanups in the clientutil.c code.Andrew Tridgell1997-10-212-32/+46
| | | | | | | I'm actually hoping to remove this module completely once we convert nmbd to using the new (much cleaner) clientgen.c smbclient now also reports if it connects as a guest user
* rewrote the password server code using the new clientgen.c clientAndrew Tridgell1997-10-214-253/+217
| | | | | | | | | interface The new code uses a source netbios name equal to the Samba servers name, not the client name. It also uses NetWkstaUserLogon to do a full network logon. This means it will honour the servers logon restrictions (such as login times etc).
* This is a set of generic SMB client routines. I needed this in a hurryAndrew Tridgell1997-10-211-0/+673
| | | | | | to fix the password server code, so I didn't use SMBlib. This code is fairly generic and uses a "struct cli_state" to hold the client state.
* get rid of the KEEP_PASSWORD_SERVER_OPEN defineAndrew Tridgell1997-10-211-4/+0
|
* add some debug infoAndrew Tridgell1997-10-211-0/+2
|
* loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison1997-10-209-42/+95
| | | | | | | | | | | | | 'dos filetimes' parameter for UTIME fix. locking_shm.c: Fixed typo (sorry Andrew :-). namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only(). proto.h: The usual. reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime). server.c: Made filetime calls use new file_utime call (wrapper for sys_utime). system.c: Added Andrew's sanity checks to times in sys_utime(). time.c: Moved set_filetime() to server.c. Made null_mtime() global. trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime). Jeremy (jallison@whistle.com)
* added "domain groups" parameter, allowing you to specify the groups thatLuke Leighton1997-10-204-3/+41
| | | | | | the user belongs to. it would be nice to know exactly what the domain groups _are_....
* removed home_share from user_info structure.Luke Leighton1997-10-201-4/+0
|
* util.c password.c :Luke Leighton1997-10-206-78/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | added automount_server() function which, if -DAUTOMOUNT is in use, returns the server name of the NIS auto.map entry. otherwise, it returns local_server. added use of automount_server() for a new substitution %N for NIS home server. this defaults, via automount_server(), to the same functionality as %L if -DAUTOMOUNT is not used. removed vuser->home_share. moved code that grabbed the servername into the separate function automount_server(). loadparm.c : created "logon drive" (default of "") created "logon home" (default of "\\%N\%U") changed default of "logon path" from NULL to "\\%N\%U\profile". ipc.c pipenetlog.c : use lp_logon_drive(), lp_logon_home() and lp_logon_path() in their now easier-to-use form (don't have to check if *lp_logon_path() and manually substitute a default of \\%L\%U and do a standard_sub_basic() on the result, because the default automatically does this.
* a major share modes reorganisation.Andrew Tridgell1997-10-208-1760/+1927
| | | | | | | | | | | | | | | | | | | The shares modes code is now split into separate files. The shared memory implementation is in locking_shm.c. The slow implementation is in locking_slow.c It is all controlled by a struct share_ops structure that has function pointers to the implementation of all the functions needed by a share modes implementation. An initialisation function sets up this structure. This will make adding new implementations easy and clean. This also allowed me to get rid of the ugly code in smbstatus. Now status.c links to the locking code and calls methods in share_ops. I also renamed some things and generally organised things in a much cleaner fashion. Defines and structures specific to each implementation have been moved to the appropriate file and out of smb.h.
* casting cleanupsAndrew Tridgell1997-10-205-18/+18
|
* I am removing these from the source code in preparation for anAndrew Tridgell1997-10-202-130/+0
| | | | | | | | | | | | | | | upcoming 1.9.18alpha release. We can't release with this code in there as it currently stands as it might breach ITAR export restrictions in the US. I've discussed ways around this with Jeremy and we can put the code back in with appropriate modifications once it is needed. Note that this code isn't actually used in Samba yet, so removing it has no effect. If anyone wants the code then look in ~samba-bugs/arcfour/ or grab it from the CVS attic.
* move calls to smbhash() inside smbdes.c (for legal reasons)Andrew Tridgell1997-10-203-12/+25
|
* update the timestamp on config files in our linked list when we noticeAndrew Tridgell1997-10-191-4/+4
| | | | they have changed, otherwise we keep reading them again and again
* debugging the srvsvc Net Share Enum. some padding issues; some string lengthLuke Leighton1997-10-193-5/+13
| | | | issues. it works!
* creating NetShareEnum parsing / reply creation. compiles, but untested.Luke Leighton1997-10-193-25/+163
|
* Makefile :Luke Leighton1997-10-195-44/+285
| | | | | | | | | | | | | | | | | | | | | added srvparse.o and pipesrvsvc.o smb.h : mods to the Net Share Enum stuff srvparse.c : Net Share Enum parsing support. more srvsvc pipe parsing to go here... pipenetlog.c util.c: modified standard_sub_basic() so that you can set a global boolean and use a different string for the %U username substitution. proto.h: the usual.
* added the following structures:Luke Leighton1997-10-191-0/+67
| | | | | | | | | | | | | SH_INFO_1 SH_INFO_1_STR SHARE_INFO_1_CTR SRV_Q_NET_SHARE_ENUM SRV_R_NET_SHARE_ENUM the share info1 container can handle a maximum of 32 shares. the share info1 string structures contain two unicode strings, with 1024 uint16 characters _each_. we're going to _have_ to dynamically allocate the unicode strings, else we'll run out of stack space. rapidly.
* pipes.c pipesrvsvc.c :Luke Leighton1997-10-192-80/+113
| | | | | moved stub srvsvc pipe function into separate file, in preparation for further work.
* put the NT_STATUS_ALLOTTED_SPACE_EXCEEDED error in instead of 0x99.Luke Leighton1997-10-181-1/+2
| | | | whatever that means.
* After talking with Andrew added "interfaces only" parameter thatJeremy Allison1997-10-183-19/+13
| | | | | turns off the filtering on the broadcast socket by default. Jeremy (jallison@whistle.com)
* .cvsignore: Added make_smbcodepageJeremy Allison1997-10-1716-236/+454
| | | | | | | | | | | | | | | | | | | | interface.c: Added is_local_net(). locking.c: Added Fix for zero length share files from Gerald Werner <wernerg@mfldclin.edu> plus a race condition fix for the fix. nameannounce.c: Made function static. namedbresp.c: extern int ClientDGRAM removed - not used. namedbserver.c: extern int ClientDGRAM removed - not used. namedbsubnet.c: Added code to make sockets per subnet. namepacket.c: Added code to read from all sockets & filter. nameresp.c: extern int ClientDGRAM removed - not used. nameserv.c: Indentation tidyup :-). nameserv.h: Added sockets to struct subnet. nameservresp.c: Improved debug message. nmbd.c: Changed to terminte on listen_for_packets exiting. nmbsync.c: extern int ClientDGRAM & ClientNMB removed - not used. proto.h: The usual. util.c: Fixed debug message. Jeremy (jallison@whistle.com)
* Simply moved the #include for ubi_dLinkList.h from within dir.c toChristopher R. Hertel1997-10-172-2/+1
| | | | includes.h. More consistent with current practice.
* make_unihdr() was setting the length to 1/2 the required value.Luke Leighton1997-10-171-2/+2
|
* pipenetlog.c lsaparse.c smb.h :Luke Leighton1997-10-174-71/+90
| | | | | | SAM logon sorting. too many buffer pointers. added in the missing switch value (value of 3). dealing with the buffer pointers to the user info structure in a slightly different way.
* smbparse.c smb.h :Luke Leighton1997-10-175-6/+21
| | | | | | | | | | | | | uni_max_len and uni_str_len are the other way round, in UNIHDR. util.c : increased the show_msg() data size from 256 bytes to 512 bytes: the LSA SAM Logon response can be about 500 bytes long. pipenetlog.c : forgot to set the authoritative field to 1.
* set the wrong info level (0x0C00 0000 instead of 0xC000 0000) so thatLuke Leighton1997-10-171-1/+1
| | | | | nt got confused and thought that the server password had been set instead of refused. this is for the SRV_PWSET response.
* remove a spurious error message from nmbd. The message was:Andrew Tridgell1997-10-171-6/+0
| | | | | | | | | WINS server did not respond to name registration! this messages should only be produced when we are trying to register our own names, not when we are the one with the name database and we are doing a NAME_REGISTER_CHALLENGE on behalf of another host (for secured wins registration)
* fix the handling of negative name query responses and the handling ofAndrew Tridgell1997-10-171-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | packets with no answer section in general. The fix has 2 parts: 1) set ans_name to the name we queried if nmb->answers == NULL 2) check for nmb->answers == NULL in several other places where we currently check for nmb->answers->data While doing this, I noticed there are lots of places in our nmbd code where we make assumptions about the packets being well formed. Someone could easily implement a denial of service attack on nmbd by sending a packet that causes a null pointer dereference. Does anyone feel like going through the code and adding checks? Probably the best solution is to have a single function that "validates" a packet, making sure that all the required fields are there. This will be a bit tricky as what fields are required varies a lot between packets. A first pass would be a function that prints "SUSPECT PACKET" when it hits a packet that it suspects does not have a required field (or the field is badly formatted), then we could use this on a live system to find any cases we've missed. Any takers?
* added -a "append log" optionAndrew Tridgell1997-10-171-1/+7
|