summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
* ipc.c ntclientpipe.c:Luke Leighton1997-10-291-0/+47
| | | | | | | | | | response to Bind Acknowledgment needs a lookup table for the PIPE string (secondary address in RPC_HDR_BA structure). smbparse.c util.c : interesting problem, i think caused by us typecasting a uint16* buffer to char*. found on a SPARC.
* called dump_data() from show_msg().Luke Leighton1997-10-291-25/+6
|
* byteorder.h :Luke Leighton1997-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | added mode for printing debug array data as chars not uint8/16/32s. only really useful for (uint8) strings or (uint16) unicode strings lsaparse.c smbparse.c smb.h : rpc bind and rpc bind ack structures and parsing and creation functions. ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c : using rpc bind / bind ack parsing routines instead of incorrect use of api_LsarpcTNP1 function. ntclient.c : creation of do_rpc_bind() function. THAT'S IT, FOLKS!
* default server_name if NIS server is unavailable should be the localLuke Leighton1997-10-241-2/+2
| | | | machine, not a NULL string.
* nterr.c :Luke Leighton1997-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | added a structure that wraps nt errors as strings and enums, so we can do a smb_nt_error() function. Makefile ntclient.c : added ntclient.c, broken out nt domain stuff into a separate file. getting fed up of compile-times and size of client.c. fixed the do_lsa_req_chal() function. made it read the response, and return the challenge credentials received from the server. next stop: do_lsa_auth_2(). client.c : removed nt domain logon functions into a separate file. pipenetlog.c pipentlsa.c pipesrvsvc.c smbparse.c : i'd broken the offsets of the RPC_HDR while trying to sort out the nt client code. fixed it again. added some robustness stuff. util.c : the unistrn2() function was null-terminating the string at one character too many.
* Big change to make nmbd code more readable/understandable.Jeremy Allison1997-10-231-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is removal of find_name_search() confusion. This has been replaced with find_name_on_subnet() which makes it explicit what is being searched. Also changed wins_subnet to be wins_client_subnet in preparation for splitting the wins subnet into client and server pieces. This is a big nmbd change and I'd appreciate any bug reports. Specific changes follow : asyncdns.c: Removed wins entry from add_netbios_entry(). This is now explicit in the subnet_record parameter. interface.c: iface_bcast(), iface_nmask(), iface_ip() return the default interface if none can be found. Made this behavior explicit - some code in nmbd incorrectly depended upon this (reply_name_status() for instance). nameannounce.c: find_name_search changes to find_name_on_subnet. namebrowse.c: wins_subnet renamed to wins_client_subnet. namedbname.c: find_name_search removed. find_name_on_subnet added. add_netbios_entry - wins parameter removed. namedbsubnet.c: find_req_subnet removed - not explicit enough. nameelect.c: wins_subnet renamed to wins_client_subnet. namepacket.c: listening() simplified. nameresp.c: wins_subnet renamed to wins_client_subnet. nameserv.c: find_name_search moved to find_name_on_subnet. nameserv.h: FIND_XXX -> changed to FIND_SELF_NAME, FIND_ANY_NAME. nameservreply.c: find_name_search moved to find_name_on_subnet. Debug entries changed. nameservresp.c: wins_subnet renamed to wins_client_subnet. namework.c: wins_subnet renamed to wins_client_subnet. nmbd.c: wins parameter removed from add_netbios_entry. nmbsync: wins_subnet renamed to wins_client_subnet. proto.h: The usual. server.c: remove accepted fd from fd_set. Jeremy (jallison@whistle.com)
* playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)Luke Leighton1997-10-231-0/+3
| | | | and then send a LSA_REQ_CHAL down it.
* loadparm.c :Luke Leighton1997-10-221-63/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* loadparm.c :Luke Leighton1997-10-211-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison1997-10-202-20/+10
| | | | | | | | | | | | | '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-201-0/+28
| | | | | | the user belongs to. it would be nice to know exactly what the domain groups _are_....
* util.c password.c :Luke Leighton1997-10-201-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* casting cleanupsAndrew Tridgell1997-10-201-1/+2
|
* Makefile :Luke Leighton1997-10-191-31/+47
| | | | | | | | | | | | | | | | | | | | | 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.
* .cvsignore: Added make_smbcodepageJeremy Allison1997-10-172-2/+14
| | | | | | | | | | | | | | | | | | | | 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)
* smbparse.c smb.h :Luke Leighton1997-10-171-3/+3
| | | | | | | | | | | | | 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.
* added loopback_ip. This is used to detect packets from ourselvesAndrew Tridgell1997-10-151-0/+2
|
* align_offset() adjusted pointer to wrong location. oops.Luke Leighton1997-10-131-2/+3
|
* added debugging macros (suitable eventually for use in tcpdump, hopefully)Luke Leighton1997-10-121-0/+8
|
* namelogon.c :Luke Leighton1997-10-111-0/+38
| | | | | | | | | | | | | | | | added NTLOGON. (fixed the case 0:) namepacket.c: call to NTLOGON mailslot nameserv.h defines for NETLOGON and NTLOGON mailslot util.c: added andrew's dump_data() function.
* fixed the log wrapping bug.Andrew Tridgell1997-10-101-12/+17
| | | | | | | | This is a very nasty bug that I think explains quite a few intermittent problems people have been having with Samba. It may be worth checking on other cases where errno can be overwritten by seemingly innocuous things (in this case a DEBUG() line)
* credentials.c:Luke Leighton1997-10-091-2/+26
| | | | | | | | | | | | | | | | | | | | | | use UTIME structure (defined and commented in smb.h to be time, secs, since 01jan1970) pipes.c: another sub-function. util.c: added char *unistr2(uint16 *buff) function. same as unistr except it takes uint16* instead of char*. smbparse.c smb.h: more structure sorting. proto.h: the usual.
* I rewrote the name_mangle() and name_len().Christopher R. Hertel1997-10-071-46/+65
| | | | | | The interface is the same, but I've simplified the code a bit and added a few comments. I tested the changes and the output is the same as that produced by the original (at least, it was in all of my tests). CRH
* increase the debug level in the "added interface" debug lineAndrew Tridgell1997-10-071-3/+3
|
* client.c: Changed shadowed variable.Jeremy Allison1997-10-061-5/+3
| | | | | | | | | | | | | locking.c: Removed USE_OPLOCKS - now the default. params.c: Removed unused variable. proto.h: Updated. reply.c: Removed USE_OPLOCKS - now the default. server.c: Removed USE_OPLOCKS - now the default. smb.h: Removed USE_OPLOCKS - now the default. smbparse.c: Changed shadowed variable. status.c: Removed USE_OPLOCKS - now the default. util.c: Removed USE_OPLOCKS - now the default. Jeremy (jallison@whistle.com)
* proto.h:Luke Leighton1997-10-041-0/+113
| | | | | | | | | | | | | | | | | | | - recreated, as usual. smb.h: - added RPC_HDR structure - the 18 byte MSRPC header smbparse.c: - added smb_io_rpc_hdr() function to read/write the RPC_HDR structure. util.c: - added align2, align4, align_offset functions. - added skip_unicode_string, unistrcpy, unistrncpy functions. - modified unistrcpy and unistrncpy to return the number of unicode characters returned, effectively making skip_unicode_string redundant.
* locking.c: Fixed incorrect parameter count in debug statements. May explainJeremy Allison1997-10-031-2/+6
| | | | | | | | | | | | | | | | | | solaris crashes. reply.c: Added NT specific error code. Put oplock break code in correct place in reply_lockingX. server.c: Removed unneeded error mapping stuff. Fixed race condition in oplock code. trans2.c: Added NT specific error code. util.c: Added paranoia check in interpret_addr. Some core dumps reported here. Upped fcntl debug levels. Andrew. Please check the NT specific error code handling (search for the string "/* Ugly - NT specific hack - but needed (JRA) */", this makes NT and 95 clients behave correctly here - please check your Visual Basic apps with this code. Jeremy (jallison@whistle.com).
* proto.h: Updated.Jeremy Allison1997-10-031-2/+2
| | | | | | | | | | server.c: Updated after netbench observation. Oplocks must be broken *before* share modes are checked, not after. Netbench seems to be working now. smb.h: Added offsets for oplock break time fields. trans2.c: Upped debug messages. util.c: Upped debug messages. Jeremy (jallison@whistle.com)
* Modified some debug messages, moved from 5 -> 8.Jeremy Allison1997-10-021-7/+7
| | | | Jeremy (jallison@whistle.com)
* dir.c: more pstrcpys.Jeremy Allison1997-09-301-47/+164
| | | | | | | | | | | local.h: Add OPLOCK_BREAK_TIMEOUT. password.c: Fix for paranoia password server security bug. proto.h: Updated. reply.c: Oplock changes. server.c: Massive oplock changes - nearly there.... smb.h: oplock definitions. util.c: Add local message processing queues for oplocks. Jeremy (jallison@whistle.com)
* Syncing up current oplock work in progress. #ifdef'ed outJeremy Allison1997-09-261-38/+37
| | | | | so should have no effect on other work. Jeremy (jallison@whistle.com)
* Correctly rolled back interface.c (I was working on an olderJeremy Allison1997-09-261-210/+186
| | | | | revision). This will now be the current revision. Jeremy (jallison@whistle.com)
* Adding Andrews buffer overflow fixes into the main branch.Jeremy Allison1997-09-264-35/+91
| | | | Jeremy (jallison@whistle.com)
* Checkin to sync up oplock development code so that NTJeremy Allison1997-09-231-1/+83
| | | | | | | | | | | | | domain development code won't diverge. Makefile: Fixed make proto (again). Added GLIBC2 fixes for Linux. includes.h: Added GLIBC2 fixes for Linux. proto.h: Much tidier. quotas.c: OSF/1 quota fix. reply.c: Fix from Ray Frush <frush@engr.colostate.edu> for zero NT timestamps. server.c util.c: First oplock checkin - nowhere near finished so bracketed with #ifdef USE_OPLOCKS. Done to make sync with NT domain code easier. Jeremy (jallison@whistle.com)
* added code from Philip A Prindeville <philipp@enteka.com> which expandsLuke Leighton1997-09-231-186/+210
| | | | | | | | the interfaces option to this: "interfaces = le0 le1" or "interfaces = all". it uses SIOCGIFxxxx ioctl calls.
* Makefile: Changed proto: target to not include c files not used currently.Jeremy Allison1997-09-191-0/+71
| | | | | | | | | | | 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)
* added timestamp to "Denied connection" message.Luke Leighton1997-09-181-2/+2
|
* - change a lot of occurances of errno to use strerror(errno). We can'tAndrew Tridgell1997-09-151-4/+4
| | | | | | | assume all our users are programmers :-) - automatically create the smbpasswd file if it doesn't exist when running smbpasswd.
* rewrote md4.c from scratch. This implementation should be portable andAndrew Tridgell1997-09-151-284/+160
| | | | doesn't have any worries about RSA copyright.
* This commit does 3 main things:Andrew Tridgell1997-09-145-73/+47
| | | | | | | | | | | | | | | | | | | | | | | 1) put the encryption code in by default, with no #ifdef. It is still disabled by default so you need to add "encrypt passwords = yes" in smb.conf but at least all binaries will have it. 2) cleanup the kanji code so it compiles with no warnings 3) get rid of lots of uses of ugly non-portable C code. The main offender being things like "register" but also remove uses of the "const" keyword as there are compilers out there that don't support it and even those that do often complain about its usage. Users don't like warnings :-( There is still some work to do. We need to replace the md4 code with our own implementation. The current code (from rfc1186) is PD but is not very portable. The new RFC (rfc1320) is more portable but adds copyright restrictions. I'll do a from-scratch MD4 soon. We also need to test that what I've implemented is portable. It should be, but I'm too tired right now to test it on anything other than intel linux.
* charcnv.c client.c clitar.c kanji.c kanji.h loadparm.cJeremy Allison1997-09-113-202/+273
| | | | | | | | | | | | | | mangle.c smb.h util.c: Big merge to allow KANJI support to be in the main binary without explicitly compiling with it. locking.c: Fix for smbstatus not being able to read files. namepacket.c: Removed unneccesary debug statement. trans2.c: Added Luke's proposed fix (ifdefed out until further testing). nmblookup.c: Fixed bug where query fails and status is done on bogus IP. Jeremy (jallison@whistle.com)
* Fixed up determination of client type for PROTOCOL_NT1. Uses clientJeremy Allison1997-09-041-0/+39
| | | | | | 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)
* reply.c: Removed unused variables. Caught by gcc -Wall -WerrorJeremy Allison1997-09-021-0/+4
| | | | | | server.c: Fix for old DOS clients not understanding ERRbaddirectory - map to ERRbadpath. util.c: Fix for systems with no LOG_DAEMON facility. Jeremy (jallison@whistle.com)
* Makefile: New program and support for dynamic codepage loading.Jeremy Allison1997-08-301-137/+159
| | | | | | | charset.c: Dynamic codepage loading code. charset.h: Defines for file format. proto.h: Updated. Jeremy (jallison@whistle.com)
* charset.c: Added patch for client code page 852 (Eastern European) fromSamba Release Account1997-08-271-0/+49
| | | | | | | Leos Bitto <bitto@altec.cz>. clitar.c: proto.h: Fixed proto mismatch for strslashcmp(). Jermey (jallison@netcom.com)
* doing that irritating compiler clash warning with the protos for standard_subSamba Release Account1997-08-271-2/+2
| | | | | | and standard_sub_basic. again. lkcl
* charset.c : Add mapping for code page 932 (KANJI).Samba Release Account1997-08-253-32/+59
| | | | | | | | | | | | client.c : Fix crash bug. Add code to use BUFFER_SIZE for NetServerEnum calls. namepacket.c: Fixed cast. nmbsync.c : Add code to use BUFFER_SIZE for NetServerEnum calls. smb.h : Set default client code page to 932 for KANJI. system.c : Remove vendor specific code that crept in :-). util.c : Added #define to allow Samba to behave as Win95 when doing KANJI case insensitivity tests. Jeremy (jallison@whistle.com)
* Kanji fixes for upper/lower case conversion with sjis characters.Samba Release Account1997-08-212-30/+131
| | | | | Code from Takashi Fujita <fujita@ainix.isac.co.jp>. Jeremy (jallison@whistle.com)
* Changes to allow Samba to return the same error code as Windows NT.Samba Release Account1997-08-201-1/+6
| | | | | | | | | | | Takes care of the cases where a Windows program is parsing a pathname component by component and expects 2 different errors. ERRbadpath - if a component in the path doesn't exist. ERRbaddirectory - if a component in the path exists but is not a directory. Extra error code added to smb.h to support this. Code based on suggestions from "Christian Groessler" <chris@fast-ag.de>. Jeremy (jallison@whistle.com)
* Makefile: Changed for HPUX10 tidyup.Samba Release Account1997-08-191-2/+9
| | | | | | | | | | | | | | | | | | includes.h: Changed for HPUX10 tidyup. ipc.c: Fixed bug where getting local server list from NT browsers would fail. nmbsync.c: Fixed bug where getting local server list from NT browsers would fail. proto.h: Changed for crash bug on SCO with USE_MMAP. quotas.c: Added OSF quotas (patch from Bret Giddings <bret@essex.ac.uk>). Rolled back solaris uid change - I think it was wrong. reply.c: Changed for crash bug on SCO with USE_MMAP. server.c: Removed Lukes changes. Changed for crash bug on SCO with USE_MMAP. smb.h: Changed for crash bug on SCO with USE_MMAP. smbpasswd.c:Fixed crash bug with Lukes changes. uid.c: Removed Lukes changes. util.c: Fixed I18N bug with extended char filenames and widelinks = no. Jeremy (jallison@whistle.com)