summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed stupid bug in read_smb_len where I was calling itself - nowJeremy Allison1997-12-201-1/+1
| | | | | calling the correct fn. Jeremy.
* client.c:Jeremy Allison1997-12-201-15/+64
| | | | | | | | | | | | | | | | clientgen.c: clientutil.c: clitar.c: Changed usage of receive_smb to new function client_receive_smb except for one use of receive_smb in client.c. This is the receive_smb used to discard packets received whilst in a keyboard wait state. util.c: Created new function client_receive_smb that ignores session keepalives just as the old receive_smb used to do. Created internal function read_smb_length_return_keepalive that is used internally by the changed receive_smb call. Changed read_smb_len to not use an internal buffer - it is never called with a null buffer so such code is redundant. Jeremy.
* loadparm.c: Added fix for veto oplock files bug from Charles Hoch ↵Jeremy Allison1997-12-201-10/+8
| | | | | | | | <hoch@hplcgh.hpl.hp.com> server.c, util.c: Added fix for oplock break requests blocking due to server being blocked in read call. Bug found by Charles Hoch <hoch@hplcgh.hpl.hp.com>. Jeremy.
* trans2.c: Forced trans2_findfirst to behave as NT does in error returns.Jeremy Allison1997-12-201-1/+2
| | | | | | util.c: Applied fix from Branko Cibej <branko.cibej@hermes.si> where StrnCaseCmp tests one character too many. Jeremy.
* This is it ! The mega-merge of the JRA_NMBD_REWRITE branchJeremy Allison1997-12-131-4/+33
| | | | | | | | back into the main tree. For the cvs logs of all the files starting nmbd_*.c, look in the JRA_NMBD_REWRITE branch. That branch has now been discontinued. Jeremy.
* fixed over char 127 problems with isupper/islower.Jeremy Allison1997-12-111-2/+7
| | | | Jeremy.
* kanji.c: Patch from Anders Blomdell <anders.blomdell@control.lth.se>Jeremy Allison1997-12-111-0/+16
| | | | | for problem with kanji sj_strXXX functions. Jeremy.
* got rid of the WRAP_MALLOC code - mem_man does it betterAndrew Tridgell1997-12-041-67/+0
|
* change the "username map" option to allow the user to stop theAndrew Tridgell1997-12-031-0/+12
| | | | | | | | processing part way through the file if a match is found. If a line starts with ! and a match is made by that line then processing stops. This allows better wildcard handling. (patch from Anselm.Kruis@Physik.Uni-Muenchen.DE)
* add a warning if the timezone is not a multiple of 1 minute. ThisAndrew Tridgell1997-12-031-0/+5
| | | | should catch broken timezone files in slackware linux.
* I'm slowly getting though the todo list :-)Andrew Tridgell1997-12-031-3/+3
| | | | | This change allows people to select the SYSLOG_FACILITY in local.h, or add it to the Makefile if they want to.
* fix toupper(c) on a already uppercase char and tolower(c) on anAndrew Tridgell1997-12-031-0/+2
| | | | | already lowercase char when using code pages. Jeremy, can you confirm that this looks right? It comes from PR#1992
* dont try getpeername() when Client isn't initialisedAndrew Tridgell1997-12-021-0/+8
|
* use -1 not 0xffffffff in SIVALS() macrosAndrew Tridgell1997-11-291-23/+1
| | | | | use the same process_exists() code on all systems (it's probably faster anyway)
* added a sent_oplock_break element to Files[] as a paranoia check so weAndrew Tridgell1997-11-291-1/+1
| | | | | | | | | | | | | | | | can't sent a oplock break twice on the same file. changed some debug levels in the oplock code to level 0 so we can track down a bug zero the returned Files[] entry in find_free_file() don't try to overcome client bugs in the handling of non-encrypted passwords if in server level security mode added paranoid null termination of password buffers slight change to my ajt_panic() routine
* added true enumerated types in loadparm.c. Now we don't need all thoseAndrew Tridgell1997-11-222-11/+6
| | | | | | | | | | | | | | | | "interpret_security" and similar functions. This also means that testparm produces string values for these enumerated types rather than an integer. This was done to make the web interface much cleaner. While I was doing this I found a couple of very nasty bugs in the parm_table code. Someone had added a handle_character_set() function that treated the char** pointer for a P_STRING as an integer! This would have caused memory corruption for anyone using the "character set" option. The loadparm code is delicate - please be careful about using it's more esoteric features! I've also removed the "coding system" global and made it a P_STRING. The integer value was never used anywhere in Samba.
* use LocTimeDiff() not TimeDiff() to ensure that longdate conversion isAndrew Tridgell1997-11-211-1/+2
| | | | consistent (this is really just a cosmetic change)
* change from %D to %m/%d/%Y in timestring(). This doesn't really matterAndrew Tridgell1997-11-061-4/+4
| | | | | | as it is only for logging but it will prevent people from writing in to say that we are not y2k compliant after running auto-diagnostic tests.
* no asm/signal.h for linux as this is not portableAndrew Tridgell1997-11-061-1/+1
| | | | | | add auto username from LOGNAME for smbtorture proto fix in ufc.c
* Rolling back the filesJeremy Allison1997-11-031-41/+0
| | | | | | | | | | | | | | | | loadparm.c : to equivalent to version 1.67 reply.c : to equivalent to version 1.69 server.c : to equivalent to version 1.122 util.c : to equivalent to version 1.98 to remove the incorrect changes. proto.h: The usual. rpc_pipes/smbparse.c : Backeting stuff that SHOULD NOT BE IN THE none-NTDOMAIN build ! Jeremy.
* Christian Lademann's contribution: new capabilities in smb.conf.Luke Leighton1997-11-021-0/+41
| | | | | | | | | | | | '<' and '|' characters indicate read file and execute command respectively, and feed the output into the parameter (!!!). '<$' and '|$' means run standard_sub_basic() on them. this is going to be fun to document in smb.conf.5.... also, Christian created a new "online" service parameter. services can be taken "off-line"....
* change a debug levelAndrew Tridgell1997-11-011-3/+3
|
* 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)