1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00
Commit Graph

133 Commits

Author SHA1 Message Date
8cac618174 Yes, dev is an 'input/output' paramater...
Andrew Bartlett
-
c1b97226db Separate out get_user_home_dir() from get_user_home_service_dir().
Jeremy.
-
cee0ec7274 Roll back PSTRING_SANCTIFY patch; just leave non-controversial type
and constness changes.
-
5b2b9c25af Removed MAXSTATUS which was set incorrectly - thus causing tdb traversal
of the connections db on smbd startup. This should fix the Solaris large
load bug.... (fingers crossed).
Jeremy.
-
490d3aaf20 Make this error match Win2k. -
ee5e7ca547 Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
-
f70fb819b2 This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
-
e7634f81c5 This commit is number 3 of 4.
In particular this commit focuses on:

Changing the Get_Pwnam code so that it can work in a const-enforced
environment.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes allow for 'const' in the Samba tree.

There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username
-
96f910bae5 add non_root_mode() check -
8d23a7441b Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.
Ensure make_conection() can only be called as root.
Jeremy.
-
7c3542ba87 Renamed vfs_init() to smbd_vfs_init() to allow vfs modules to compile. -
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
99e8a263ad Rearrange the ordering of the checks in make_connection(). The new order has
some sainity, avoiding things like 'root preexec' when the connection would
otherwise already be denied (max connections).

This does change behaviour, but I think its for the best.

Andrew Bartlett
-
0deae6c407 got rid of bogus write list substitution error messages -
fb0c3629c3 Kill off the //server/share%user hack in share level security.
This should help make much of this code simpiler.

Andrew Bartlett
-
d47016de52 Actually fill in the status for sainity checks
Andrew Bartlett
-
1d36250e33 converted another bunch of stuff to NTSTATUS -
8c3cf2db95 OK, so not freeing these was a mistake. I'll try to be less exuberent next
time :-)
-
ba76564c2a Move the claim_connection stuff till a little later in the process.
(You don't have to clean up somthing you haven't done yet...)
-
6fd8eb08c1 Move admin user check into a helper function.
Formatting fixes.
-
7dc716f174 Move read only check into a helper funcion. Ensure conn->service is set
before we use it to find a share's details.
-
15c87e404f smbd/auth_server: Doco, we want to use cli_nt_error here soon
smbd/password.c: We don't use globals here anymore

smbd/reply.c: Tidyness, global_myworkgroup must die!

smbd/service.c:  Move some of the make_connection code into a helper
                 function.
-
b377f06fd9 better debug messages + fix typo in debug message -
36af1c0dc4 - don't try to print pointers
- removed some unused mangling code
-
7257d07563 Convert other parameters (read list, write list, valid users...) to the P_LIST format.
changed functions to use list instead of strings
addedd lp_list_substitute function
-
0b13f495b3 Tidied up calling yield_connection on connection allocation fail.
Restore debug message to level zero.
Jeremy.
-
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-
c24e6b41ea Ensured all the system calls in msdfs.c go through the vfs layer.
Added vfs calls to symlink() and readlink() with appropriate configure
checks.
Jeremy.
-
15b17a80db added a close-share smbcontrol message that forcibly closes a share in smbd (to allow unmount) -
be7e1d0f2c Now we're doing the substituion in the lp_string code remove the erroneous
debug 0 warning.
Jeremy.
-
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
-
e7d59d6de8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
-
20b13bafdf Fix for core dump in security = share code with new share security db.
Jeremy.
-
036b1a8b09 Added set/get SD's on shares. Check before tcon.
Jeremy.
-
f50ea32dd0 Fix from Ed Boraas for not core dumping when out of connection structs.
Jeremy.
-
07cee46d1d Patch from Massimo Sivilotti <mass@tanner.com> to log remote machine/ip on
connection fail.
Jeremy.
-
83133bab0e Added ADMIN$ share as alias for IPC$ except no guest connect. AS/U wants
to do RPC calls down this treeid.
Jeremy.
-
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
a72d12e992 smbd/process.c: & type with 0xff for paranioa sake...
smbd/reply.c smbd/service.c: cause all "add home service" calls to go through a
winbindd aware function.
Jeremy.
-
22d6c2c163 only add the service name and client machine name to list of users names
for a session when in share mode security


--jerry
-
2844ec3d51 include/vfs.h:
smbd/vfs-wrap.c:
smbd/vfs.c: Added fchmod_acl and chmod_acl.
lib/substitute.c:
smbd/lanman.c:
smbd/open.c:
smbd/process.c:
smbd/reply.c:
smbd/service.c: Removed sessetup_user variable. Added current_user_info struct
which conatins domain info etc. Added '%D' for client domain parameter.
Jeremy.
-
7b774b72c2 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - Unrolled construct_notify_jobs_info() loop to only fetch
          printer info_2 structure once rather than num_print_jobs times.
        - convert command to unix codepage.
        - remove lp_remove_service() call as it prevents lp_killservice()
          from working.
        - Modified some DEBUG and DEBUGADD statements.

    source/param/loadparm.c
    source/param/params.c
        - change printer, preload, auto services to FLAG_DOS_STRING,
          reverted earlier changes to szPrintername et al, add comments.

    source/printing/load.c
        - fix bug with lp_auto_services() and strtok()

    source/printing/nt_printing.c
    source/printing/printing.c
        - remove redundant test that used SERVICE(snum)

    source/printing/pcap.c
        - add unix_to_dos() calls, add notes wrt FIXMEs for
          xxx_printer_fn() functions.

    source/web/swat.c
        - added FIXME comment.

    source/smbd/service.c
        - added comment re: dos codepage
-
1dba9c5cd1 Changes from APPLIANCE_HEAD:
source/Makefile.in
        - changes to ctags and etags rules that somehow got lost along the way.

    source/include/proto.h
        - make proto

    source/smbd/sec_ctx.c
    source/smbd/password.c
        - merge debugs for debugging user groups and NT token stuff.

    source/lib/util_str.c
        - capitalise domain name returned from parse_domain_user()

    source/nsswitch/wb_client.c
        - fix broken conditional in debug statement.

    source/include/rpc_secdes.h
    source/include/rpc_spoolss.h
    source/printing/nt_printing.c
    source/lib/util_seaccess.c
        - fix printer permission bugs related to ACE masks for printers.
          This adds mapping of generic access rights to object specific
          rights for NT printers.  Still need to work out whether or not to
          ignore ACEs with certain flags set, though. See comments in
          util_seaccess.c:check_ace() for details.

    source/printing/nt_printing.c
    source/printing/printing.c
        - use PRINTER_ACCESS_ADMINISTER instead of JOB_ACCESS_ADMINISTER
          until we sort out printer/printjob permission stuff.
-
806185ca8c Compile fix for new arg to create_nt_token() -
209e20365e we don't need the separate lp_status() connection records any more -
3575ad1098 fixed the problem with messages not getting through
the problem had nothing to do with being your own pid, it was instead
a problem with IPC$ connections not being registered in the
connections database and an incorrect test for -1 in the messaging
code.

These changes also mean that IPC$ shares now show up in
smbstatus. That is probably a good thing.
-
d0fbb4f5d9 Added a VFS version return to init call. Allows smbd to fail an init if
versions don't match.
Jeremy.
-
5b0038a2af Fix to allow smbd to call winbindd if it is running for all group enumeration,
falling back to the UNIX calls on error. This should fix all problems with
smbd enumerating all users in all groups in all trusted domains via winbindd.
Also changed GETDC to query 1C name rather than 1b name as only the PDC
registers 1b.
Jeremy.
-
15d7f16bdc Don't initialise groups twice. -