History log of /src/bin/sh/alias.c (Results 1 – 25 of 244)
Revision Date Author Comments
# 632c73b4 09-Feb-2026 Tuukka Pasanen <tuukka.pasanen@ilmi.fi>

sh: Add SPDX-License-Identifier tags

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55213


# 9d29fc2e 15-May-2025 Joseph Mingrone <jrm@FreeBSD.org>

sh: Avoid referencing uninitialized memory in alias

If run as
alias ''
uninitialized memory could be referenced.

This is based on a fix from NetBSD. For more information, refer to
https://github.

sh: Avoid referencing uninitialized memory in alias

If run as
alias ''
uninitialized memory could be referenced.

This is based on a fix from NetBSD. For more information, refer to
https://github.com/NetBSD/src/commit/10cfed82c28 .

Obtained from: NetBSD (Robert Elz <kre@netbsd.org>, 10cfed82c28)
MFC after: 3 days

Reported by: mckusick, Robert Elz <kre@netbsd.org>
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50364

show more ...


# e043f372 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 90aea514 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Remove ancient SCCS tags.

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 s

bin: Remove ancient SCCS tags.

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

show more ...


# 2fc4a84e 29-Apr-2023 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

sh: introduce a function to iterate over all aliases

Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, w

sh: introduce a function to iterate over all aliases

Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, which will become needed by a future commit.

The new function "iteralias" takes a null pointer to return the first
alias or an existing alias to return the next one, unless there is
no alias to return, in which case it returns a null pointer.

I slightly changed the static function hashalias so that it returns the
index into the array holding link heads, and not the link head directly.
In this form it's easier to use by iteralias and the slight adjustment
in the three existing callers doesn't look too bad.

Differential Revision: https://reviews.freebsd.org/D40619

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 9d29fc2e 15-May-2025 Joseph Mingrone <jrm@FreeBSD.org>

sh: Avoid referencing uninitialized memory in alias

If run as
alias ''
uninitialized memory could be referenced.

This is based on a fix from NetBSD. For more information, refer to
https://github.

sh: Avoid referencing uninitialized memory in alias

If run as
alias ''
uninitialized memory could be referenced.

This is based on a fix from NetBSD. For more information, refer to
https://github.com/NetBSD/src/commit/10cfed82c28 .

Obtained from: NetBSD (Robert Elz <kre@netbsd.org>, 10cfed82c28)
MFC after: 3 days

Reported by: mckusick, Robert Elz <kre@netbsd.org>
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50364

show more ...


# e043f372 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 90aea514 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Remove ancient SCCS tags.

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 s

bin: Remove ancient SCCS tags.

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

show more ...


# 2fc4a84e 29-Apr-2023 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

sh: introduce a function to iterate over all aliases

Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, w

sh: introduce a function to iterate over all aliases

Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, which will become needed by a future commit.

The new function "iteralias" takes a null pointer to return the first
alias or an existing alias to return the next one, unless there is
no alias to return, in which case it returns a null pointer.

I slightly changed the static function hashalias so that it returns the
index into the array holding link heads, and not the link head directly.
In this form it's easier to use by iteralias and the slight adjustment
in the three existing callers doesn't look too bad.

Differential Revision: https://reviews.freebsd.org/D40619

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 554491ff 20-Apr-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r316992 through r317215.


# 026dfd4a 16-Apr-2017 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix use after free when resetting an in-use alias.

The special case of modifying an existing alias does not work correctly if
the alias is currently in use. Instead, handle this case by unaliasi

sh: Fix use after free when resetting an in-use alias.

The special case of modifying an existing alias does not work correctly if
the alias is currently in use. Instead, handle this case by unaliasing the
old alias (if any) and then creating a new alias.

show more ...


# 773e27ae 16-Apr-2017 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix unalias -a while an alias is currently in use.

It is a rare situation to modify aliases while an alias is currently in use,
but this is handled for plain unalias. Handle it for unalias -a as

sh: Fix unalias -a while an alias is currently in use.

It is a rare situation to modify aliases while an alias is currently in use,
but this is handled for plain unalias. Handle it for unalias -a as well.

show more ...


# 05e626c3 02-Apr-2017 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Remove an XXX comment: it is normal for builtins to use argptr.


# 348238db 01-Mar-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r314420 through r314481.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


# 76f38317 22-Feb-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r295845 through r295901.


# 317cec3c 22-Feb-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# 2ece3386 21-Feb-2016 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Don't hash alias name when there are no aliases.


# b5ff185e 12-Sep-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# ab875b71 13-Aug-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head, primarily for the 1.14.4.0 firmware.


# 4cd9b24e 04-Jul-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r284737 through r285152.


# c3c85727 24-Jun-2015 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix some arithmetic undefined behaviour.

Fix shifts of possibly negative numbers found with ubsan and avoid signed
integer overflow when hashing an extremely long command name.

MFC after: 1 week


# 6cec9cad 03-Jun-2014 Peter Grehan <grehan@FreeBSD.org>

MFC @ r266724

An SVM update will follow this.


12345678910