Commit Graph

51 Commits

Author SHA1 Message Date
mrg
2e19323388 add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk.  use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
2018-02-25 00:16:48 +00:00
elric
07b0c75a48 We no longer need -I/usr/include/krb5. 2011-04-24 21:42:06 +00:00
lukem
050e20c6d5 Be consistent about making USE_PAM!=no be exclusive to USE_SKEY!=no. 2008-04-06 09:54:37 +00:00
christos
3670ce19dd - move grutil code to newgrp.
- enable user:group and :group code.
2007-10-27 15:37:45 +00:00
christos
40d5720e00 From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
  *disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
  not ask for a password.
- split out shared code into a separate file.
2007-10-17 21:05:39 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos
2b91c98c21 remove PAM_DEBUG 2006-07-13 18:18:09 +00:00
christos
85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
christos
dcf51e5c6a Use LOGIN_CAP even in the pam case. 2005-12-15 14:03:34 +00:00
he
8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
thorpej
c829edc516 Test USE_PAM, not MKPAM. 2005-01-13 00:13:33 +00:00
christos
b2f0c10f07 undo accidental commit with MKPAM=yes 2005-01-12 01:46:03 +00:00
christos
6c0f1bcc27 :x 2005-01-12 01:45:31 +00:00
christos
6b47b9b52a LOGIN_CAP is mandatory for PAM. 2005-01-10 23:31:34 +00:00
christos
2ef14ae88a Restore su.c to version 1.58, plus minor prototyping. Split pam
into su_pam.c, and turn it off by default in the Makefile until it
is tested and actually works. The current pam version does not set ruid
properly anymore.
2005-01-10 03:11:50 +00:00
lukem
ed83e0847a add DPADD 2005-01-08 09:54:36 +00:00
manu
e628e84aaa Add PAM support to su 2005-01-07 22:34:20 +00:00
dyoung
4758291178 Fix the checkflist for builds without Kerberos 4 (MKKERBEROS4=no)
and without Kerberos 4 & 5 (MKKERBEROS=no). Previously checkflist
complained of missing files.

* move kerberos- and kerberos 4-only files into new flists,
  distrib/sets/lists/*/krb.*

* make the flist generators grok MKKERBEROS{,4} variables

* fix Makefiles which treat MKKERBEROS=no as MKKERBEROS5=no.
  9 out of 10 experts agree that it is ludicrous to build w/
  KERBEROS4 and w/o KERBEROS5.

* fix header files, also, which treat MKKERBEROS=no as MKKERBEROS5=no.

* omit some Kerberos-only subdirectories from the build as
  MKKERBEROS{,4} indicate

(I acknowledge the sentiment that flists are the wrong way to go,
and that the makefiles should produce the metalog directly.  That
sounds to me like the right way to go, but I am not prepared to do
revamp all the makefiles.  While my approach is expedient, it fits
painlessly within the current build architecture until we are
delivered from flist purgatory, and it does not postpone our
delivery. Fair enough?)
2003-12-11 09:46:26 +00:00
lha
afad8d1f7c libkrb depends on libdes, patch in private mail from
Harold Gutch logix at foobar franken de
2003-08-23 23:03:42 +00:00
christos
791007d1e3 Normalize the program's compilation options so they are all of the form SU_
and document them.
2003-08-20 14:11:17 +00:00
tron
86b35822ff Backout previous and revert su(1) to dynamic linking instead. 2003-07-24 16:18:21 +00:00
tron
b2df6d93aa Link with "libdes" if Kerberos IV support is enabled. 2003-07-24 16:06:45 +00:00
itojun
e63468d8cc split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
2003-07-23 08:01:24 +00:00
itojun
e91a21c27c add DPADD. 2002-10-23 01:25:35 +00:00
thorpej
9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
sjg
e5aa080165 SU_INDIRECT_GROUP should not be on by default. 2001-01-11 00:54:57 +00:00
sjg
91d1372fc6 If SU_INDIRECT_GROUP is defined (it is by default), then su will
consider that SUGROUP and ROOTAUTH group contain the names of
users and groups.  If user is not found in the list check_ingroup()
recurses on each member until either user is found or end of chain
is reached.

The above allows su's use of the wheel group to be extended to a large
number of users without necessarily putting them in group wheel, and
in a way that will work over NIS that simply extending the line length
limit in getgrent.c cannot.
2001-01-10 21:33:13 +00:00
simonb
9b22175a26 Remove INSTALLFLAGS=-fschg, as per change to usr.bin/ssh/ssh/Makefile. 2000-10-18 00:24:18 +00:00
assar
6d7f2da1a1 remove -lvers, it's not used 2000-08-03 22:56:29 +00:00
assar
549a4d9cdc update build infrastructure for heimdal 0.3a 2000-08-03 04:02:29 +00:00
mycroft
98987090cb Fix library order. 2000-07-23 22:23:14 +00:00
assar
8d33b0b319 add Kerberos5 support 2000-07-10 02:09:15 +00:00
thorpej
df83a2a3cd Add MK... variables to enable/disable various aspects of building
crypto support into the system.  See share/mk/bsd.README for more
a full description.
2000-06-23 06:01:10 +00:00
thorpej
e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so.  Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
2000-06-20 06:00:24 +00:00
mjl
e6ac440ed4 Implement login_cap capability lookup. 2000-01-14 02:39:14 +00:00
mrg
51a96a002f optionally include CRYPTOPATH Makefile.frag files. 1999-07-20 09:35:18 +00:00
thorpej
9630ed475e Use bsd.crypto.mk. 1999-07-12 22:11:37 +00:00
kim
bfb603392a Allow people in group wheel to use the ROOTAUTH group.
Pick up SUROOTAUTH (presumably from /etc/mk.conf).
1999-07-11 23:41:10 +00:00
scottr
8481f548e2 Remove the crypto-related bits until such time as we have a fully-
integrated source tree.  Export-controlled versions of these are now
built during the domestic build process.
1999-02-18 21:22:51 +00:00
mycroft
d91c72fbd3 Minor changes. 1997-10-12 13:10:16 +00:00
mycroft
4163fb775c Make this compile without SKEY. 1997-10-12 12:54:20 +00:00
lukem
aaa55367ba As per discussion with mrg, back out parts of previous change.
The appropriate entry in /etc/group as returned by getgrnam() is
used to determine if 'su root' may be permitted, rather than
checking if membership exists in the result of getgroups().

The following changes were made regarding the behaviour of the special
group for 'su root'
* allow for definition of SUGROUP (defaults to "wheel") to override group name.
* use getgrnam(SUGROUP) instead of getgrgid(0).
* only scan getgrnam(SUGROUP)->gr_mem when checking for group membership.
* be more specific as to why 'su root' failed

NOTE: If a user's primary group is SUGROUP, and they're not a member
of SUGROUP in /etc/group, they will not be able to su.
1997-07-02 05:42:11 +00:00
tls
9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
tls
653b58e924 Sync to 4.4BSD-Lite2 1997-01-09 11:43:05 +00:00
christos
17b3a275d4 Fix PR/2837: su [login [args]] had the wrong usage and did not work properly. Build the correct argument list and add -c for the shells.
Fix PR/2839: su will not build with Kerberos.

- Also:
	-Don't coredump when $TERM is not set.
	-Add prototypes, remove local old style declarations of system
	 functions.
	-Recognize shells that contain "csh" as being csh alike.
	-Don't build with SKEY unconditionally. Obey bsd.own.mk.
1996-10-12 23:54:38 +00:00
deraadt
1a3b9af761 add skey support 1994-05-24 06:52:17 +00:00
cgd
4b30c543a0 always use libcrypt 1993-10-07 02:16:39 +00:00
mycroft
75ff3a90bd Add RCS identifiers. 1993-07-30 23:49:23 +00:00
cgd
86677cb02a changed to use new libcrypt scheme. 1993-04-26 14:42:34 +00:00
cgd
649bd7ccc5 added support for using real crypt 1993-03-22 23:27:33 +00:00