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:
Axel Dörfler
2015-07-22 20:43:54 +02:00
parent 1281fcd3cb
commit 05a567f609
4 changed files with 36 additions and 5 deletions
+1 -2
View File
@@ -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
View File
@@ -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
} }
} }
+1
View File
@@ -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
+32
View File
@@ -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;
}