Age | Commit message (Collapse) | Author | Files | Lines |
|
It will try sysv IPC first, then if that fails it will try mmap(),
then after that it will try share files.
I have defined USE_SYSV_IPC for Linux, Solaris and HPUX at the
moment. Probably a lot more could have it defined. In fact, the vast
majority of systems support it. Need autoconf again :-)
It should actually be faster than the mmap() version, and doesn't need
any lock files. This means the problem of the share mem file being on
a NFS drive will be gone.
(This used to be commit cc8fe0f0629eea9acc39e30d8d76d5890a5b6978)
|
|
updated Query Info Policy to report domain name and domain sid for info levels
3 and 5.
fixed bug in dom_sid_to_string (idauths decoded wrong). fixed bug in DOM_SID:
subauths are 32 bit not 16.
(This used to be commit 2f3cca23e2465ca6a3a31fda005af1fd74f6af92)
|
|
fixed a problem with byte ordering (doing an SIVAL of the setup parameters
which was _also_ being done in the creation of the SMB header. oops).
(This used to be commit 541fb82895008cc30477019cdcafed9fdbbeac43)
|
|
(This used to be commit 16cc27852bf54999db4b0a3665b0743d9fe0e74a)
|
|
0644. smbstatus now gets only read permission on the share files and
does no locking.
also get rid of some unnecessary umask(0) calls. smbd always runs with
umask(0)
(This used to be commit c6ac10170dbba57dfebc54c50d79cb29d13bb442)
|
|
Q/R LSA_REQ_CHAL; Q/R LSA_AUTH2; Q/R LSA_SAMLOGON; Q/R LSA_SAMLOGOFF.
the last (non-essential right now) bit is the LSA_SRV_PWSET.
the next stage is to do LSA_OPENPOLICY; add the pipe binds (missing right
now); then we can test against an NT Server.
(This used to be commit 0a549e62fbf11a3ff1f1de663176e30006553e08)
|
|
code, which means we don't have to link with a fake getpass routine
and we don't have a whole pile of global variables that really have
nothing to do with nmbd and were there to keep the client code happy.
The code should function identically to what it did before (hopefully
it was correct)
The only thing that now uses the horrible clientutil.c code is
smbclient.
(This used to be commit 4bf5c03b18f88b566f3ac12cc4b3a9c5c96fd35d)
|
|
(This used to be commit 9eee8c2007bf4f7756f6d645a61055101d280316)
|
|
adding bits for new nt domain code
byteorder.h :
trying to get macros right, and not to crash on SUNOS5...
client.c :
added #ifdef NTDOMAIN, and created do_nt_login() function. don't
want to have to recompile client.c unless absolutely necessary.
credentials.c :
moved deal_with_creds() [possibly inappropriately] into credentials.c
ipc.c reply.c server.c uid.c :
attempting to make (un)become_root() functions calleable from smbclient.
this is a little tricky: smbclient might have to be another setuid
root program, immediately setuid'ing to non-root, so that we can
reset-uid to root to get at the smbpasswd file. or, have a secure
pipe mechanism to smbd to grab smbpasswd entries. or the like.
smbdes.c smbencrypt.c :
created a function to generate lm and nt owf hashes.
lsaparse.c ntclient.c smbparse.c :
added nt client LSA_AUTH2 code. it works, too!
pipenetlog.c pipentlsa.c pipesrvsvc.c :
simplification. code-shuffling. getting that damn offset right
for the opcode in RPC_HDR.
smb.h :
changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL.
we might need to store the server times as well.
proto.h :
the usual.
(This used to be commit 82436a3d99d4bdce249ce9ff27fd2ca4b2447e07)
|
|
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.
(This used to be commit 39cec7f698c4461aee05cfbb213879fbd486117d)
|
|
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)
(This used to be commit 2c97b33fc0b5ef181dbf51a50cb61074935165bf)
|
|
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!
(This used to be commit 0cc8ce43e1d54b44237bb525f4cf6b77e7ca3ced)
|
|
and then send a LSA_REQ_CHAL down it.
(This used to be commit 473f21071fad603865358821b83df6b58c9a06a5)
|
|
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
(This used to be commit b88ee3e16c6b671069f53ca2e9c5694ec8b1c030)
|
|
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.
(This used to be commit 6ee065ce6e099acfc7e83ad399ef6e60b4c625c1)
|
|
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)
(This used to be commit ec60e48d7982240b7755d246b2f1e8989467f66f)
|
|
shared memory implementation)
(This used to be commit 8d1993c71a5d5d32636f62ba9b9a9009ec74d730)
|
|
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.
(This used to be commit f2554f231d1f59f30224adcc02b2b3ca4c24e0dd)
|
|
(This used to be commit 2b976cb7ecf50c118bd15923f6500bb8d2e058b7)
|
|
'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)
(This used to be commit 41a1d81c112a82ad2ae1b3c4ee81051f133ce1ed)
|
|
the user belongs to.
it would be nice to know exactly what the domain groups _are_....
(This used to be commit c6e37d8db0cd89a84a54a0cedfeacf50fb3f7a4c)
|
|
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.
(This used to be commit c6c28a4c3c9010ff9d5eac4bad091189a786d5a0)
|
|
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.
(This used to be commit 65ab9adaa0d356b8041ed8a507ea52117f2a284e)
|
|
(This used to be commit ab849a97821c9e1f199eea8ea2ec477687bed947)
|
|
(This used to be commit 9dfab27da3634539e99eb48c85dd5a64212e7005)
|
|
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.
(This used to be commit 22b86b6499b2680d16cb4180a736b4e750147409)
|
|
turns off the filtering on the broadcast socket by default.
Jeremy (jallison@whistle.com)
(This used to be commit db9aad07481f48c0fe2108d4ab0b2bc9b632816c)
|
|
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)
(This used to be commit 6904c2de080b2a9702800e9e4126386ced20569d)
|
|
locking.c: Adding Andrews become_root code to the main branch.
pipes.c: Fixing the close_file issue.
proto.h: The usual.
reply.c: Move smb_pass into NTDOMAIN defined code. Fixing the close_file issue.
server.c: Fixing the close_file issue.
trans2.c: Fixing the close_file issue.
uid.c: Adding Andrews become_root code to the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit 16fd4337f79ce33f91050c96c4a566221c5d9126)
|
|
whoops, the SAM Logon structure was wrong. updated this, and
cifsntdomain.txt. more debug info in pipenetlog.c. the crash
is somewhere around deal_with_credentials().
byteorder.h :
put in uint8, uint16 and uint32 typecasts around debug info, because
sign extending was resulting in ffffffe8 being displayed instead of e8.
credentials.c :
some debugging info, because i'm tracking a coredump. without gdb.
nothing like making things difficult.
reply.c :
whoops, missed this (important) bit from paul's code, which tells
the NT workstation that the MACHINE$ entry doesn't already exist,
and we're going to create a default entry with a password "machine"
right now.
proto.h:
the usual.
(This used to be commit ed606bc7d4e6fb1091e527ea70a3e950d50a1db4)
|
|
and NETSERVERGETINFO.
(This used to be commit 96b17b829fc787c15cd366eca604c09d68b5b900)
|
|
(This used to be commit bdf3155418be02e2fe4daa1d2538f236be414e98)
|
|
(This used to be commit 9b095887df204393090d7da9a47508685ddd5163)
|
|
(This used to be commit 8fe02c239d70497af449ed0cdf1a32de10021ba1)
|
|
ipc.c :
removed srvsvc pipe reference: have to do that.
pipes.c lsaparse.c smbparse.c :
more debugging info. looks a bit like netmon output.
(This used to be commit e02aa88e25ae6d4da7953aaff04ff2ae9a656d05)
|
|
debugging info. found that data = NULL because of short packet length
indicated from the ntlsaRPC pipe _royally_ stuffs NT's packet handling.
maybe this should go down as a service denial bug to the ntbugtraq list.
pipes.c lsaparse.c smbparse.c :
added more debug stuff. added length of header to data_len in MSRPC
fragment_length field (0x18 bytes short) which caused the above bug
from NT 4.0. oops.
(This used to be commit a6f8de6815e0b85bb23b302980730501ac0b87e5)
|
|
(This used to be commit 946d73cf838976b905550288cac3aea7c43959f6)
|
|
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.
(This used to be commit 1eaad1c99463dcd42eb8ff4ea5686ad9ec6fc42e)
|
|
(This used to be commit 2ade5b2706b884fbca2a5794912280a58bc41a08)
|
|
#if NTDOMAIN
call to api_netlogRPC
#endif
lsaparse.c :
renamed lsa_io_q_auth2 to lsa_io_q_auth_2.
pipes.c :
added api_lsa_reply_auth_2() and api_netlogRPC.
proto.h :
the usual.
(This used to be commit e2e1979b6215080593728942d414a273505877df)
|
|
added credentials.c to smbd
credentials.c:
using credential structures instead of char*
password.c uid.c server.c:
added sid and attr to user_struct.
smbdes.c:
smbhash and str_to_key make public instead of private.
pipes.c smb.h:
lsa structures, sub-functions.
proto.h:
usual.
(This used to be commit 87a0a944855a673d693d934e446bdc231b1c7f02)
|
|
in ipc.c iff NTDOMAIN is defined.
(This used to be commit 7bc4c4c27bf18ce3f632d230dc919ea341b5abb0)
|
|
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.
(This used to be commit 72a86f514f0c92b69499718e63f5dd73ebece56e)
|
|
added lp_domainsid()
lsaparse.c smb.h:
debugging structures and parsing functions
pipes.c:
finally got to the functions that will go into the RPC switch statement.
(This used to be commit d15aed8a9c58a7cc90befaee2d5a2752708f9327)
|
|
some routines to create LSA RPC packets. none of them are used.
lsaparse.c:
smbparse.c:
smb.h:
more tidy-up.
(This used to be commit b37e21273e81b875876e8e8ddf6804714044ffd8)
|
|
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)
(This used to be commit b93509846d6291771787af457500eec8984ee6bd)
|
|
(This used to be commit 5bc75c6c626251dc8ba04ff4a83e81b92d93d2d6)
|
|
lsaparse.c, smbparse.c, smb.h: more functions / structures.
proto.h: the usual.
(This used to be commit a1c718728c46ebf8916af8985b4dae4d099f4ec2)
|
|
(This used to be commit 2f722fe289051558dbe77aeb0a830bb3ded10a83)
|
|
- 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.
(This used to be commit b0ad811cda3dcffed5b24104229813cdb17b014f)
|