aboutsummaryrefslogtreecommitdiff
path: root/bin/csh
Commit message (Collapse)AuthorAgeFilesLines
* csh: Add SPDX-License-Identifier tagsTuukka Pasanen2026-02-182-0/+4
| | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55206
* csh: Remove gethost dependency on tc.const.hEd Maste2025-02-091-1/+6
| | | | | | | | | | | | | | | | | gethost is a build tool built in stage 2.3, but it had a dependency on tc.const.h, which requires target headers (that are not installed until stage 4.1). The build falls back to the host's headers if the target headers don't yet exist, which may result in a build failure if the host's headers don't match the target. As gethost.c doesn't actually require the definitions in tc.const.h, add a hack to skip the include of tc.const.h and remove the dependency. PR: 283273 Reviewed by: imp Sponsored by: The FreeBSD Foundation Fixes: e754e5f36195 ("Upgrade to 6.10") Differential Revision: https://reviews.freebsd.org/D48880
* csh: Remove hardlink /.cshrcEmmanuel Vadot2024-05-291-9/+0
| | | | | | | | | | | | | Remove this historical artifact. csh will try to use /.csrch if the user has no home directory defined which is rather unlikely (To be exact if the concatenation of $HOME and "/.cshrc" fail which is the same thing). Also, with this change pkg will happily handle 3way merge for /root/.cshrc Differential Revision: https://reviews.freebsd.org/D45382 Reviewed by: emaste, imp Sponsored by: Beckhoff Automation GmbH & Co. KG
* csh: Use HOST_CC when compiling hostprog used by csh buildStephen J. Kiernan2024-03-271-1/+1
| | | | | | | | The "gethost" program should be built with the host compiler. Obtained from: Juniper Networks, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44537
* bin: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Fix /root permissions after 'make installworld'Thomas Eberhardt2023-11-161-0/+1
| | | | | | | | | | | | | | | | | According to /etc/mtree/BSD.root.dist /root should have 0750 permissions, but the build target 'make installworld' changes these to 0755. This is caused by the installation of the configuration files of sh(1) and csh(1). Correct this by specifying the correct default /root permissions. PR: 273342 Reviewed by: jilles Approved by: jilles MFC after: 2 weeks Differential Revision:https://reviews.freebsd.org/D42395
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-167-7/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-162-2/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Fix building host tools for hostSimon J. Gerraty2023-04-201-1/+4
| | | | | | | | | | | | | | | Several makefile depend on tools built for host. At least when using DIRDEPS_BUILD we can build these for the pseudo machine "host" to facilitate building on older host versions. Ideally we would build these tools in their own directories to avoid building more than needed. For now, setting an appropriate default for BTOOLSPATH will suffice Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39708
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-2/+2
|
* csh: install hard link with same mode as targetEd Maste2022-11-291-1/+4
| | | | | | | | | | | | | Previously when using NO_ROOT we recorded METALOG entries for the /.cshrc hard link with a different file mode than the link target, which is not permitted. We cannot just set LINKMODE here as it would also apply to the hard link for the tcsh binary. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37499
* pkgbase: Create a FreeBSD-csh packageEmmanuel Vadot2021-12-211-1/+4
| | | | | | | | | | Now that root uses /bin/sh as the default shell no need to have csh part of runtime. Put it in its own package. MFC after: never Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33471
* vfs: add restrictions to read(2) of a directory [1/2]Kyle Evans2020-06-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, we've allowed read() of a directory and some filesystems will accommodate (e.g. ufs/ffs, msdosfs). From the history department staffed by Warner: <<EOF pdp-7 unix seemed to allow reading directories, but they were weird, special things there so I'm unsure (my pdp-7 assembler sucks). 1st Edition's sources are lost, mostly. The kernel allows it. The reconstructed sources from 2nd or 3rd edition read it though. V6 to V7 changed the filesystem format, and should have been a warning, but reading directories weren't materially changed. 4.1b BSD introduced readdir because of UFS. UFS broke all directory reading programs in 1983. ls, du, find, etc all had to be rewritten. readdir() and friends were introduced here. SysVr3 picked up readdir() in 1987 for the AT&T fork of Unix. SysVr4 updated all the directory reading programs in 1988 because different filesystem types were introduced. In the 90s, these interfaces became completely ubiquitous as PDP-11s running V7 faded from view and all the folks that initially started on V7 upgraded to SysV. Linux never supported this (though I've not done the software archeology to check) because it has always had a pathological diversity of filesystems. EOF Disallowing read(2) on a directory has the side-effect of masking application bugs from relying on other implementation's behavior (e.g. Linux) of rejecting these with EISDIR across the board, but allowing it has been a vector for at least one stack disclosure bug in the past[0]. By POSIX, this is implementation-defined whether read() handles directories or not. Popular implementations have chosen to reject them, and this seems sensible: the data you're reading from a directory is not structured in some unified way across filesystem implementations like with readdir(2), so it is impossible for applications to portably rely on this. With this patch, we will reject most read(2) of a dirfd with EISDIR. Users that know what they're doing can conscientiously set bsd.security.allow_read_dir=1 to allow read(2) of directories, as it has proven useful for debugging or recovery. A future commit will further limit the sysctl to allow only the system root to read(2) directories, to make it at least relatively safe to leave on for longer periods of time. While we're adding logic pertaining to directory vnodes to vn_io_fault, an additional assertion has also been added to ensure that we're not reaching vn_io_fault with any write request on a directory vnode. Such request would be a logical error in the kernel, and must be debugged rather than allowing it to potentially silently error out. Commented out shell aliases have been placed in root's chsrc/shrc to promote awareness that grep may become noisy after this change, depending on your usage. A tentative MFC plan has been put together to try and make it as trivial as possible to identify issues and collect reports; note that this will be strongly re-evaluated. Tentatively, I will MFC this knob with the default as it is in HEAD to improve our odds of actually getting reports. The future priv(9) to further restrict the sysctl WILL NOT BE MERGED BACK, so the knob will be a faithful reversion on stable/12. We will go into the merge acknowledging that the sysctl default may be flipped back to restore historical behavior at *any* point if it's warranted. [0] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:10.ufs.asc PR: 246412 Reviewed by: mckusick, kib, emaste, jilles, cy, phk, imp (all previous) Reviewed by: rgrimes (latest version) MFC after: 1 month (note the MFC plan mentioned above) Relnotes: absolutely, but will amend previous RELNOTES entry Differential Revision: https://reviews.freebsd.org/D24596 Notes: svn path=/head/; revision=361798
* Fix .depend files to work for build tools.Bryan Drewery2019-06-151-0/+1
| | | | | | | | | | This is somewhat of a follow-up to r335746. MFC after: 2 weeks Sponsored by: DellEMC Notes: svn path=/head/; revision=349062
* Don't mess with BLOCKSIZE in shell startup files - it's set by login.conf(5);Edward Tomasz Napierala2019-01-202-4/+0
| | | | | | | | | | | | | there's no need to even mention it in shell rc files. Not that it's wrong; just pointless and somewhat misleading. Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18809 Notes: svn path=/head/; revision=343231
* Finish moving dot.cshrc and dot.profile to bin/csh/ and bin/sh/.Brad Davis2018-08-292-1/+51
| | | | | | | | Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D16770 Notes: svn path=/head/; revision=338374
* Fix the install of /root/.login missed as part of r337849.Brad Davis2018-08-281-1/+4
| | | | | | | Approved by: re (rgrimes) Notes: svn path=/head/; revision=338362
* Revert parts of r337849 and r337857Brad Davis2018-08-152-54/+1
| | | | | | | | | | | | This fixes the build and I will redo these changes as part of a future review that organizes them differently. The way I tried to do it here could be done better. Sorry for the noise. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16737 Notes: svn path=/head/; revision=337882
* Fix build after r337849Brad Davis2018-08-151-3/+2
| | | | | | | | | | | | This moves the symlink creation to after where the files are installed. This also inverts the shell change so that it only happens if MK_TCSH is on. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16725 Notes: svn path=/head/; revision=337857
* Move all sh and csh files into bin/sh/ or bin/csh/Brad Davis2018-08-156-1/+90
| | | | | | | | | | | This simplifies pkgbase by migrating these to CONFS so they are properly tagged as config files. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16708 Notes: svn path=/head/; revision=337849
* Don't use CCACHE for linking.Bryan Drewery2018-06-271-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Notes: svn path=/head/; revision=335733
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Update to tcsh 6.20.00Dmitry Chagin2017-03-251-0/+1
| | | | Notes: svn path=/head/; revision=315948
* bin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-1/+1
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314655
* WITH_META_MODE: Fix bin/csh rebuilding tc.const.hBryan Drewery2016-06-141-1/+1
| | | | | | | | | | | | | This is the same issue as r297997, but was missed in it. The WARNS value changes between 'build-tools' (MK_WARNS=no) and 'everything' resulting in a rebuild of this file. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301881
* DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.Bryan Drewery2016-05-091-1/+1
| | | | | | | | | This avoids running target binaries. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299289
* Stop using sbrk in csh. This is a legacy interface and its use within cshAndrew Turner2016-04-261-1/+1
| | | | | | | | | | is invalid. It is used to find the size of allocated memory. As malloc may allocate memory with mmap it will fail to take this memory into account. Obtained from: brooks Notes: svn path=/head/; revision=298626
* MFHGlen Barber2016-04-161-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * META_MODE: Don't rebuild build-tools targets during normal build.Bryan Drewery2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297997
* | MFHGlen Barber2016-04-111-2/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297824
| * Revert r296416 by removing SAVESIGVEC and switching to fork instead. ThisMark Peek2016-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | fixes usage with system libraries which maintain their own signal state. PR: 208132 Obtained from: kib MFC after: 3 days Notes: svn path=/head/; revision=297673
* | MFHGlen Barber2016-04-041-1/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297567
| * CCACHE_BUILD: Don't use ccache when generating some files with CC -E.Bryan Drewery2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | At least for ncurses this fixes a build error due to it trying to run 'ccache --version' to work around a gcc 5 bug using the fix in r287205. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297250
* | MFHGlen Barber2016-03-061-0/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296422
| * Signal handling within tcsh vfork code path will conflict with some systemMark Peek2016-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | libraries (such as libthr) which maintain their own signal state. This change adds the tcsh SAVESIGVEC option to save and restore the sigvecs for the signals the child modifies before it execs. Reviewed by: kib, rwatson Reported by: kib Notes: svn path=/head/; revision=296416
* | MFHGlen Barber2016-03-021-222/+0
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-222/+0
| | | | | | | | | | | | | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* | Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
|/ | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Don't link /usr/share/nls/de_DE.UTF-8/tcsh.cat to itself.Bryan Drewery2016-02-031-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295224
* The charset of NLS catalogs were converted to UTF-8Hajimu UMEMOTO2016-02-031-29/+28
| | | | | | | since r231990. Notes: svn path=/head/; revision=295204
* Make dynamic link of libiconv from ports work again.Hajimu UMEMOTO2016-02-021-3/+3
| | | | | | | | | | | | | | The symbols of libiconv from ports were changed to have prefixed. Since we have iconv in our libc these days, we don't need it on 10.X and later. However, 9.X still need this. Spotted by: Yoshihiko Sarumaru MFC after: 1 days Notes: svn path=/head/; revision=295147
* Fix a ton of speelling errorsEitan Adler2015-10-211-1/+1
| | | | | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Notes: svn path=/head/; revision=289677
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+243
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-273-5/+4
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-3/+4
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802