mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-23 22:14:20 +02:00
Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d071223ab |
||
|
|
db7f8ac5d3 | ||
|
|
a22805d44b |
||
|
|
b6fba46b08 |
3 changed files with 17 additions and 7 deletions
|
|
@ -27,8 +27,6 @@ Join us on Matrix over at [#ly-dm:matrix.org](https://matrix.to/#/#ly-dm:matrix.
|
|||
|
||||
- xorg-xauth
|
||||
|
||||
- shutdown
|
||||
|
||||
- brightnessctl
|
||||
|
||||
### Debian
|
||||
|
|
@ -180,9 +178,10 @@ On non-systemd systems, you can change the TTY Ly will run on by editing the cor
|
|||
|
||||
```
|
||||
# zig build installexe -Dinit_system=runit
|
||||
# rm /var/service/lightdm
|
||||
# unlink /var/service/lightdm
|
||||
# ln -s /etc/sv/ly /var/service/
|
||||
# rm /var/service/agetty-tty2
|
||||
# touch /etc/sv/agetty-tty2/down
|
||||
# unlink /var/service/agetty-tty2
|
||||
```
|
||||
|
||||
### s6
|
||||
|
|
|
|||
10
src/auth.zig
10
src/auth.zig
|
|
@ -574,7 +574,15 @@ fn executeCmd(global_log_file: *LogFile, allocator: std.mem.Allocator, io: std.I
|
|||
fn redirectStandardStreams(global_log_file: *LogFile, io: std.Io, session_log: []const u8, create: bool) !std.Io.File {
|
||||
create_session_log_dir: {
|
||||
const session_log_dir = std.Io.Dir.path.dirname(session_log) orelse break :create_session_log_dir;
|
||||
std.Io.Dir.cwd().createDirPath(io, session_log_dir) catch |err| {
|
||||
|
||||
var buffer = std.mem.zeroes([std.Io.Dir.max_path_bytes]u8);
|
||||
const len = std.Io.Dir.cwd().realPathFile(io, session_log_dir, &buffer) catch |err| {
|
||||
try global_log_file.err(io, "auth/sys", "failed to resolve path for session log file directory: {s}", .{@errorName(err)});
|
||||
return err;
|
||||
};
|
||||
const resolved_path = buffer[0..len];
|
||||
|
||||
std.Io.Dir.cwd().createDirPath(io, resolved_path) catch |err| {
|
||||
try global_log_file.err(io, "auth/sys", "failed to create session log file directory: {s}", .{@errorName(err)});
|
||||
return err;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -149,8 +149,11 @@ pub fn main(init: std.process.Init) !void {
|
|||
}
|
||||
}
|
||||
|
||||
var gpa = std.heap.DebugAllocator(.{}).init;
|
||||
defer _ = gpa.deinit();
|
||||
var gpa: std.heap.DebugAllocator(.{
|
||||
.never_unmap = builtin.mode == .Debug,
|
||||
.retain_metadata = builtin.mode == .Debug,
|
||||
}) = .init;
|
||||
defer if (gpa.deinit() == .leak) std.log.err("attention please, memory has been leaked!", .{});
|
||||
|
||||
state.allocator = gpa.allocator();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue