Added autologin command, and use it by default.
* This will handle our current single-user login needs. * Removed Login from the minimum image again.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# This file defines the content of the minimum Haiku image.
|
# This file defines the content of the minimum Haiku image.
|
||||||
|
|
||||||
SYSTEM_BIN = [ FFilterByBuildFeatures
|
SYSTEM_BIN = [ FFilterByBuildFeatures
|
||||||
addattr alert arp
|
addattr alert arp autologin
|
||||||
bc beep bfsinfo
|
bc beep bfsinfo
|
||||||
catattr checkfs checkitout chop clear cmp collectcatkeys compress copyattr
|
catattr checkfs checkitout chop clear cmp collectcatkeys compress copyattr
|
||||||
dc desklink df diff diff3 diskimage draggers
|
dc desklink df diff diff3 diskimage draggers
|
||||||
@@ -41,7 +41,6 @@ SYSTEM_APPS = [ FFilterByBuildFeatures
|
|||||||
CharacterMap
|
CharacterMap
|
||||||
Debugger DeskCalc Devices DiskProbe DiskUsage DriveSetup
|
Debugger DeskCalc Devices DiskProbe DiskUsage DriveSetup
|
||||||
Expander
|
Expander
|
||||||
Login
|
|
||||||
NetworkStatus
|
NetworkStatus
|
||||||
ProcessController
|
ProcessController
|
||||||
ShowImage StyledEdit
|
ShowImage StyledEdit
|
||||||
|
|||||||
+2
-3
@@ -72,8 +72,7 @@ service x-vnd.Haiku-power_daemon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target login {
|
target login {
|
||||||
job x-vnd.Haiku-Login {
|
job x-vnd.Haiku-autologin {
|
||||||
launch /system/apps/Login
|
launch /system/bin/autologin
|
||||||
legacy
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ StdBinCommands
|
|||||||
|
|
||||||
# standard commands that need libbe.so
|
# standard commands that need libbe.so
|
||||||
StdBinCommands
|
StdBinCommands
|
||||||
|
autologin.cpp
|
||||||
beep.cpp
|
beep.cpp
|
||||||
catattr.cpp
|
catattr.cpp
|
||||||
checkfs.cpp
|
checkfs.cpp
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2015, Axel Dörfler, [email protected].
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <LaunchRoster.h>
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
if (getuid() != 0)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
// TODO: This will obviously be done differently in a multi-user
|
||||||
|
// environment; we'll probably want to merge this with the standard
|
||||||
|
// login application then.
|
||||||
|
struct passwd* passwd = getpwuid(0);
|
||||||
|
if (passwd == NULL)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
status_t status = BLaunchRoster().StartSession(passwd->pw_name);
|
||||||
|
if (status != B_OK)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user