1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Andrew Tridgell
3dfc0c8472 changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit ee09e9dadb)
1998-05-11 06:38:36 +00:00
Jeremy Allison
01df1ed95f This should (hopefully :-) be the final fix for the %U %G substitution
problem....
smbpass.c: Removed Luke's dire warning - as some of the functions in here
*need* to be called externally :-).
Jeremy.
(This used to be commit 1fd8d12ca4)
1998-05-07 19:04:14 +00:00
Jeremy Allison
a2bddb20ed Fixes for the %U and %G problems people have reported.
Essentially, multiple session_setup_and_X's may be done
to an smbd. As there is only one global variable containing
the requested connection name (sessionsetup_user), then any
subsequent sessionsetups overwrite this name (causing %U
and %G to get the wrong name). This is particularly common
when an NT client does a null session setup to get a
browse list after the user has connected, but before
a share has been mounted.

These changes store the requested_name in the vuid structure
(so this only really works for user level and above security)
and copies this name back into the global variable before
the standard_sub call.

Jeremy.
(This used to be commit b5187ad6a3)
1998-05-06 01:34:51 +00:00
Jeremy Allison
99e11e171e Makefile: Added AIX 3.2.5.
loadparm.c: Added "win95 bug compatibility" parameter.
local.h: Replaced MAX_OPEN_FILES back to 100 from 10 (oops).
reply.c: Fixed ulogoff check against uid - changed to vuid.
server.c: Changed file struct save of uid - changed to vuid.
smb.h: Changed id in struct current_user to vuid.
       Changed file struct uid to vuid.
time.c: Added "win95 bug compatibility" atime -> mtime return.
trans2.c: Added "win95 bug compatibility" fixes.
uid.c: Changed id in struct current_user to vuid - added checks
       to set/reset it.
util.c: Added code to expand environment variables.
version.h : still at 1.9.18 (head branch doesn't matter too much at present).
Jeremy.
(This used to be commit adc903bcf5)
1998-02-11 11:07:14 +00:00
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
d4979e7727 Fixed security bug when 'force user' and 'user only' are set.
Reported by Brian McCauley <B.A.McCauley@bham.ac.uk>.
Jeremy.
(This used to be commit 00067800a2)
1997-12-23 11:30:58 +00:00
Jeremy Allison
36e5b646d9 ipc.c: Changing back arbitrary alignment change until I know *why*
luke changed it.
proto.h: The usual.
uid.c: Fix crash bug when attaching with smbclient -mCORE. A vuid
pointer was being used when it was null.
Jeremy.
(This used to be commit ff94f97cf2)
1997-11-06 23:34:51 +00:00
Luke Leighton
390c1f3c4d Makefile :
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 82436a3d99)
1997-10-25 10:58:18 +00:00
Andrew Tridgell
0aa3935917 fix the order of become_uid() and become_gid() in become_root(). This
was a harmless bug but left log entries

code cleanup in reply_lanman2()
(This used to be commit 8e90e1ef27)
1997-10-21 11:54:57 +00:00
Jeremy Allison
359d42c08d ipc.c: Adding Andrews become_root code to the main branch.
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 16fd4337f7)
1997-10-15 21:53:59 +00:00
Luke Leighton
c5e739febe Makefile:
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 87a0a94485)
1997-10-10 14:48:05 +00:00
Samba Release Account
e9269c67a5 Makefile: Changed for HPUX10 tidyup.
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)
(This used to be commit bf1c79f7fd)
1997-08-19 19:22:26 +00:00
Samba Release Account
ea4c7557dd connecting to IPC$ goes under the guest account. the IPC$ share should
be treated no differently than any other share (for any security setting:
user, server or share).

this will clear up a bug where, when clients connect to the IPC$ share, this
used to be done under the guest account.  the standard_sub_basic() macros
will substitute the _guest_ account for %U, causing the samba server to
look different from when the client then connects to any other share.

lkcl
(This used to be commit 3852656960)
1997-08-17 21:03:12 +00:00
Samba Release Account
612111c7a1 charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map
            twice.
charset.h:  Changes to support charset changes.
client.c:   Changes to support charset changes.
loadparm.c:	follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch>
nmbd.c:		Changes to support charset changes.
nmblookup.c:Changes to support charset changes.
proto.h:	Changes to support charset changes.
reply.c:	Don't call security=server with no user/no password guest. Fix from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu>
server.c:   follow symlinks code from David Clerc <David.Clerc@cui.unige.ch>
smbpasswd.c:Changes to support charset changes.
status.c:	Changes to support charset changes.
testparm.c: Changes to support charset changes.
testprns.c: Changes to support charset changes.
uid.c:		Fixed log message with no \n.
Jeremy (jallison@whistle.com)
(This used to be commit 2a28a6e5e4)
1997-07-18 20:21:32 +00:00
Samba Release Account
9e37076f2b shmem.c: Changed debug to higher level
uid.c:		Stop smbrun from deleting device files.
util.c:		Added EAGAIN to known error list.
Jeremy (jallison@whistle.com)
(This used to be commit c07db8d8e7)
1997-06-27 00:26:59 +00:00
Samba Release Account
3ab97ebe6d charcnv.c: Fixed silly bugs detected on IRIX.
client.c:	Fixed silly bugs detected on IRIX.
namedbname.c:	Stopped 1d names from being registered in WINS db.
namedbsubnet.c:	Only register 1e names on broadcast subnet.
nameelect.c:	Changed add_my_name entries. Forced host announces if we
                have less than 10 servers listed. Fixed registering 1b
                domain name issues.
namepacket.c:	Added error message when dgram discarded.
nameserv.c:	Added notion of 'direct' names that are not registered on
                the network. Needed to get around bugs in earlier nmbd
                handling of DOMAIN(1b) names.
nameservreply.c:Tidied up debug message.
nameservresp.c:	Added response_name_query_domain() code. Deals with
                re-registering DOMAIN(1b) name.
nmbd.c:		Fixed silly bugs detected on IRIX.
nmblib.c:	Added paranoia debugs.
proto.h:	Updated remove_name_entry(), add_my_name_entry().
server.c:	Fixed silly bugs detected on IRIX.
trans2.c:	Fixed silly bugs detected on IRIX.
uid.c:		Fixed silly bugs detected on IRIX.
version.h:	Updated to alpha3.
Jeremy (jallison@whistle.com).
(This used to be commit f08222bd8b)
1997-05-30 20:40:48 +00:00
Samba Release Account
0f1f0ceb95 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)
Wed May  7 1997: Update for 1.9.17alpha1 release - 'browsefix release'
designed to make browsing across subnets work.

byteorder.h:	Updated copyright to 1997.
charcnv.c:      Updated copyright to 1997.
charset.c 	Updated copyright to 1997.
charset.h	Updated copyright to 1997.
client.c	Updated copyright to 1997.
clientutil.c	Updated copyright to 1997.
dir.c		Updated copyright to 1997.
fault.c		Updated copyright to 1997.
includes.h	Updated copyright to 1997.
interface.c	Updated copyright to 1997.
ipc.c		Updated copyright to 1997.
kanji.c		Updated copyright to 1997.
kanji.h		Updated copyright to 1997.
loadparm.c	Updated copyright to 1997.
locking.c	Updated copyright to 1997.
mangle.c	Updated copyright to 1997.
message.c	Updated copyright to 1997.
nameannounce.c

	Made use of WINS subnet explicit.
Added reset_announce_timer() so announcement
can be made immediately when we become a master.
Expanded code to do sync with dmb.

namebrowse.c

	Removed redundent checks for AM_MASTER in
sync code. Made use of WINS subnet explicit.

namedbname.c	Made use of WINS subnet explicit.
namedbresp.c	Made use of WINS subnet explicit.
namedbserver.c	Made use of WINS subnet explicit.

namedbsubnet.c

	Explicitly add workgroup to WINS subnet
when we become a dmb. Made use of WINS subnet explicit.

namedbwork.c

	Made use of WINS subnet explicit. Removed
redundent check_work_servertype() function.

nameelect.c

	Explicitly add workgroup to WINS subnet
when we become a master browser. Made use of WINS subnet explicit.

namelogon.c	Updated copyright to 1997.
namepacket.c	Updated copyright to 1997.
namequery.c	Updated copyright to 1997.

nameresp.c

	Made use of WINS subnet explicit. Made nmbd fail if
configured as master browser and one exists already.

nameserv.c

	Made use of WINS subnet explicit. Remove redundent
logon server and domain master code.

nameserv.h	Add emumerate subnet macros.
nameservreply.c	Made use of WINS subnet explicit.
nameservresp.c	Updated copyright to 1997.

namework.c

	Made use of WINS subnet explicit. Updated code to
add sync browser entries to add subnet parameter.

nmbd.c

	Added sanity check for misconfigured nmbd.

nmblib.c	Updated copyright to 1997.
nmblookup.c	Updated copyright to 1997.
nmbsync.c

	Removed redundent AM_ANY_MASTER check.

params.c	Updated copyright to 1997.
password.c	Updated copyright to 1997.
pipes.c		Updated copyright to 1997.
predict.c	Updated copyright to 1997.
printing.c	Updated copyright to 1997.

proto.h

	Changed protos for new nmbd code.

quotas.c	Updated copyright to 1997.
replace.c	Updated copyright to 1997.
reply.c		Updated copyright to 1997.
server.c	Updated copyright to 1997.
shmem.c		Updated copyright to 1997.
smb.h		Updated copyright to 1997.
smbencrypt.c	Updated copyright to 1997.
smbpasswd.c	Updated copyright to 1997.
smbrun.c	Updated copyright to 1997.
status.c	Updated copyright to 1997.
system.c	Updated copyright to 1997.
testparm.c	Updated copyright to 1997.
testprns.c	Updated copyright to 1997.
time.c		Updated copyright to 1997.
trans2.c	Updated copyright to 1997.
trans2.h	Updated copyright to 1997.
uid.c		Updated copyright to 1997.
username.c	Updated copyright to 1997.
util.c		Updated copyright to 1997.
version.h

	Changed to 1.9.17alpha1.
(This used to be commit cf23a155a1)
1997-05-08 01:14:17 +00:00
Samba Release Account
697e46373c Changed become_user to take a vuid as second arg.
Consistent with other changes to make smb_uid an index+offset
into the validated_users table.
jra@cygnus.com
(This used to be commit 89675f8ae8)
1996-10-25 20:50:31 +00:00
Andrew Tridgell
ec85f2e53d - revert to old idle dir code (marty pointed out a problem with the
new code)

- handle server level security in the new "detect NT password length
stuffups" code
(This used to be commit 7c135d4994)
1996-10-07 15:04:48 +00:00
Andrew Tridgell
38087ccb40 - use workgroup from smb.conf in smbclient
- change debug level on clitar stuff

- define MAP_FILE if not defined

- ensure we never set authoritative on queries in nmbd

- fake a positive response to SMBioctl, apparently this is needed for
some WfWg printer drivers

- deny file access for non-fcbopen queries when (access_allowed == AREAD && flags == O_RDWR)

- add sys_waitpid()
(This used to be commit 61e3116e57)
1996-10-05 02:54:37 +00:00
Andrew Tridgell
e23f2b9cef - changed the umask handling. We now set the umask to 0 and explicitly
set the mode on all created files. I think this is a better policy.

- change the debug levels on some items

- fix a charset handling bug which affected foreign and extended
charset users

- no longer switch back to the original directory when idle, instead
switch to / as the original directory may not be readable by ordinary
users.

- fix some bugs where the create mode of files was not being
explicitly set (it was relying on the umask and using fopen). Not a
big bug as it only affected obscure commands like the messaging ops.

- got rid of the lock code in the lpq cache as its no longer needed

- rewrote smbrun to be faster and to remove the security hole. We now
don't actually need a external smbrun binary, its all done by smbd.

- add a more explicit warning about uids and gids of -1 or 65535
(This used to be commit 5aa735c940)
1996-10-04 09:31:07 +00:00
Andrew Tridgell
7e3b4a1c0d got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone
to error than the old method of manually adding prototypes
(This used to be commit b551dc98f7)
1996-06-10 04:38:24 +00:00
Andrew Tridgell
a2c1623827 a huge pile of changes :-)
The biggest thing is the integration of Lukes new nmbd. Its still
largely untested, so we will really need some feedback

I've also added auto prototype generation and cleaned up a lot of
minor things as a result
(This used to be commit 0d8dcfa13c)
1996-06-04 06:42:03 +00:00
Andrew Tridgell
81e398963d - moved the uid handling to uid.c
- added setfsuid() support (for Linux)
- started adding some of Lukes changes, just the loadparm and ipc ones
so far
(This used to be commit 72543810ce)
1996-06-01 15:25:30 +00:00