Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
e5cae36f
Commit
e5cae36f
authored
Dec 09, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
etc: pull the old switcheroo on login shells
parent
377b5bd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
auth.inc
usr/local/etc/inc/auth.inc
+2
-2
rc.bootup
usr/local/etc/rc.bootup
+2
-2
rc.initial
usr/local/etc/rc.initial
+2
-2
No files found.
usr/local/etc/inc/auth.inc
View file @
e5cae36f
...
...
@@ -398,7 +398,7 @@ function local_user_set(& $user) {
/* configure shell type */
/* Cases here should be ordered by most privileged to least privileged. */
if
(
userHasPrivilege
(
$user
,
"user-shell-access"
)
||
userHasPrivilege
(
$user
,
"page-all"
))
{
$user_shell
=
"/bin/
t
csh"
;
$user_shell
=
"/bin/csh"
;
}
elseif
(
userHasPrivilege
(
$user
,
"user-copy-files"
))
{
$user_shell
=
"/usr/local/bin/scponly"
;
}
elseif
(
userHasPrivilege
(
$user
,
"user-ssh-tunnel"
))
{
...
...
@@ -418,7 +418,7 @@ function local_user_set(& $user) {
/* root user special handling */
if
(
$user_uid
==
0
)
{
$cmd
=
"/usr/sbin/pw usermod -q -n root -s /
bin/sh
-H 0"
;
$cmd
=
"/usr/sbin/pw usermod -q -n root -s /
usr/local/etc/rc.initial
-H 0"
;
if
(
$debug
)
log_error
(
sprintf
(
gettext
(
"Running: %s"
),
$cmd
));
$fd
=
popen
(
$cmd
,
"w"
);
...
...
usr/local/etc/rc.bootup
View file @
e5cae36f
...
...
@@ -60,11 +60,11 @@ function rescue_detect_keypress() {
if
(
in_array
(
$key
,
array
(
"r"
,
"R"
)))
{
putenv
(
"TERM=cons25"
);
echo
"
\n\n
Recovery mode selected...
\n
"
;
passthru
(
"/usr/bin/env TERM=cons25 /bin/
t
csh -c /usr/local/installer/lua_installer_rescue"
);
passthru
(
"/usr/bin/env TERM=cons25 /bin/csh -c /usr/local/installer/lua_installer_rescue"
);
}
elseif
(
in_array
(
$key
,
array
(
"i"
,
"I"
)))
{
putenv
(
"TERM=cons25"
);
echo
"
\n\n
Installer mode selected...
\n
"
;
passthru
(
"/usr/bin/env TERM=cons25 /bin/
t
csh -c /usr/local/installer/lua_installer"
);
passthru
(
"/usr/bin/env TERM=cons25 /bin/csh -c /usr/local/installer/lua_installer"
);
if
(
file_exists
(
"/tmp/install_complete"
))
{
passthru
(
"/etc/rc.reboot"
);
exit
;
...
...
usr/local/etc/rc.initial
View file @
e5cae36f
...
...
@@ -14,7 +14,7 @@
# If recovery console shell option has been specified
if
[
-f
"/tmp/donotbootup"
]
;
then
/usr/bin/env
prompt
=
"%B[%n@%m]%b%/(%h)||RecoveryConsoleShell: "
/bin/
t
csh
/usr/bin/env
prompt
=
"%B[%n@%m]%b%/(%h)||RecoveryConsoleShell: "
/bin/csh
rm
"/tmp/donotbootup"
echo
"Rebooting in 5 seconds... CTRL-C to abort..."
sleep
5
...
...
@@ -110,7 +110,7 @@ case ${opmode} in
/etc/rc.initial.ping
;;
8
)
/bin/
t
csh
/bin/csh
;;
9
)
/usr/local/sbin/pftop
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment