mirror of
https://github.com/fairyglade/ly.git
synced 2026-09-22 12:00:19 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60be7ada9e | ||
|
|
863162b5f7 | ||
|
|
809728e06a | ||
|
|
255af0f1d4 | ||
|
|
a6e5f87e24 | ||
|
|
c90aec373e | ||
|
|
35fa91058b |
@@ -123,7 +123,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
const run_cmd = b.addRunArtifact(exe);
|
const run_cmd = b.addRunArtifact(exe);
|
||||||
run_cmd.step.dependOn(b.getInstallStep());
|
run_cmd.step.dependOn(b.getInstallStep());
|
||||||
run_cmd.addPassthruArgs();
|
if (b.args) |args| run_cmd.addArgs(args);
|
||||||
|
|
||||||
const run_step = b.step("run", "Run the app");
|
const run_step = b.step("run", "Run the app");
|
||||||
run_step.dependOn(&run_cmd.step);
|
run_step.dependOn(&run_cmd.step);
|
||||||
@@ -188,7 +188,7 @@ fn getVersionStr(b: *std.Build, name: []const u8, version: std.SemanticVersion)
|
|||||||
const git_describe_raw = b.runAllowFail(&[_][]const u8{
|
const git_describe_raw = b.runAllowFail(&[_][]const u8{
|
||||||
"git",
|
"git",
|
||||||
"-C",
|
"-C",
|
||||||
try b.root.toString(b.allocator),
|
b.build_root.path orelse ".",
|
||||||
"describe",
|
"describe",
|
||||||
"--match",
|
"--match",
|
||||||
"*.*.*",
|
"*.*.*",
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
.name = .ly,
|
.name = .ly,
|
||||||
.version = "1.6.0",
|
.version = "1.6.0",
|
||||||
.fingerprint = 0xa148ffcc5dc2cb59,
|
.fingerprint = 0xa148ffcc5dc2cb59,
|
||||||
.minimum_zig_version = "0.17.0",
|
.minimum_zig_version = "0.16.0",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.ly_ui = .{
|
.ly_ui = .{
|
||||||
.path = "ly-ui",
|
.path = "ly-ui",
|
||||||
},
|
},
|
||||||
.clap = .{
|
.clap = .{
|
||||||
.url = "git+https://github.com/Hejsil/zig-clap?ref=master#e91d66b1abba2024cd2e816426f14d233d3dad9a",
|
.url = "git+https://github.com/Hejsil/zig-clap#fc1e5cc3f6d9d3001112385ee6256d694e959d2f",
|
||||||
.hash = "clap-0.12.0-oBajB2LpAQD1BQpAukHcuwhIUoHWYNy2DzU6lDW2v2N8",
|
.hash = "clap-0.11.0-oBajB7foAQC3Iyn4IVCkUdYaOVVng5IZkSncySTjNig1",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ fn installText(
|
|||||||
destination_directory: std.Io.Dir,
|
destination_directory: std.Io.Dir,
|
||||||
destination_directory_path: []const u8,
|
destination_directory_path: []const u8,
|
||||||
destination_file: []const u8,
|
destination_file: []const u8,
|
||||||
options: std.Io.Dir.CreateFileOptions,
|
options: std.Io.File.CreateFlags,
|
||||||
) !void {
|
) !void {
|
||||||
var file = try destination_directory.createFile(io, destination_file, options);
|
var file = try destination_directory.createFile(io, destination_file, options);
|
||||||
defer file.close(io);
|
defer file.close(io);
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ pub fn build(b: *std.Build) void {
|
|||||||
});
|
});
|
||||||
mod.addImport("zlua", zlua.module("zlua"));
|
mod.addImport("zlua", zlua.module("zlua"));
|
||||||
|
|
||||||
const translate_c = b.dependency("translate_c", .{});
|
const translate_c = b.dependency("translate_c", .{
|
||||||
|
.target = target,
|
||||||
|
});
|
||||||
|
|
||||||
addCImport(b, mod, translate_c, target, optimize, "pam", "#include <security/pam_appl.h>");
|
addCImport(b, mod, translate_c, target, optimize, "pam", "#include <security/pam_appl.h>");
|
||||||
addCImport(b, mod, translate_c, target, optimize, "utmp", "#include <utmpx.h>");
|
addCImport(b, mod, translate_c, target, optimize, "utmp", "#include <utmpx.h>");
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
.name = .ly_core,
|
.name = .ly_core,
|
||||||
.version = "1.2.0",
|
.version = "1.2.0",
|
||||||
.fingerprint = 0xddda7afda795472,
|
.fingerprint = 0xddda7afda795472,
|
||||||
.minimum_zig_version = "0.17.0",
|
.minimum_zig_version = "0.16.0",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.zigini = .{
|
.zigini = .{
|
||||||
.url = "git+https://github.com/AshAmetrine/zigini?ref=main#085badbf90e25016f4609b5bde334689cdb41c5c",
|
.url = "git+https://github.com/AshAmetrine/zigini?ref=master#a665d081dda42664a96da2840ea09c5ccf9d0692",
|
||||||
.hash = "zigini-0.6.0-BSkB7UtYAAB6b6HEm3Pjj5WIy-uiuBYsNTNCUENVwL1t",
|
.hash = "zigini-0.5.0-BSkB7e9WAACfyCBABNZiWL3gFMw18GKn3qBcPs8L1Ec1",
|
||||||
},
|
},
|
||||||
.translate_c = .{
|
.translate_c = .{
|
||||||
.url = "git+https://codeberg.org/ziglang/translate-c?ref=master#3da873cacdd7e9190fe1cf40372ddf5387c970ea",
|
.url = "git+https://codeberg.org/ziglang/translate-c?ref=zig-0.16.x#6fe0ffc4549f15c5f2d9432c2b4460ba90ff85ac",
|
||||||
.hash = "translate_c-0.0.0-Q_BUWktLBwBO7VLbmrOKUcAMRtE5fmOxI35189X5XbJs",
|
.hash = "translate_c-1.0.0-Q_BUWo_5BgD4flHdUhA31zOz0XvZk9k7lQv1ouzyNXj2",
|
||||||
},
|
},
|
||||||
.zlua = .{
|
.zlua = .{
|
||||||
.url = "git+https://github.com/AnErrupTion/ziglua?ref=zig-0.17#4159a5592a8de728022e0c491a3bdde7decbdc16",
|
.url = "git+https://github.com/natecraddock/ziglua?ref=zig-0.16#8f271c82baa5fc43aa02a72f6da020c2025d9436",
|
||||||
.hash = "zlua-0.1.0-hGRpCw6VBQDaOiIiYsLOcQTlcJCpqDqIrhyDVqkanTSB",
|
.hash = "zlua-0.1.0-hGRpC2aABQD4D9PBVH3wAW8k32-I4969MRQ0CpOwoley",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pub fn info(self: *LogFile, io: std.Io, category: []const u8, comptime message:
|
|||||||
} else {
|
} else {
|
||||||
var buffer: [1024]u8 = undefined;
|
var buffer: [1024]u8 = undefined;
|
||||||
const slice = try std.fmt.bufPrint(&buffer, message, args);
|
const slice = try std.fmt.bufPrint(&buffer, message, args);
|
||||||
const msg = try std.fmt.bufPrintSentinel(buffer[slice.len..], "[info/{s}] {s}", .{ category, slice }, 0);
|
const msg = try std.fmt.bufPrintZ(buffer[slice.len..], "[info/{s}] {s}", .{ category, slice });
|
||||||
|
|
||||||
std.posix.system.syslog(std.posix.LOG.INFO, msg.ptr);
|
std.posix.system.syslog(std.posix.LOG.INFO, msg.ptr);
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ pub fn err(self: *LogFile, io: std.Io, category: []const u8, comptime message: [
|
|||||||
} else {
|
} else {
|
||||||
var buffer: [1024]u8 = undefined;
|
var buffer: [1024]u8 = undefined;
|
||||||
const slice = try std.fmt.bufPrint(&buffer, message, args);
|
const slice = try std.fmt.bufPrint(&buffer, message, args);
|
||||||
const msg = try std.fmt.bufPrintSentinel(buffer[slice.len..], "[info/{s}] {s}", .{ category, slice }, 0);
|
const msg = try std.fmt.bufPrintZ(buffer[slice.len..], "[info/{s}] {s}", .{ category, slice });
|
||||||
|
|
||||||
std.posix.system.syslog(std.posix.LOG.ERR, msg.ptr);
|
std.posix.system.syslog(std.posix.LOG.ERR, msg.ptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
const ErrInt = @Int(.unsigned, @bitSizeOf(anyerror));
|
const ErrInt = std.meta.Int(.unsigned, @bitSizeOf(anyerror));
|
||||||
const PaddingInt = @Int(.unsigned, 8 - (@bitSizeOf(ErrInt) + @bitSizeOf(bool)) % 8);
|
const PaddingInt = std.meta.Int(.unsigned, 8 - (@bitSizeOf(ErrInt) + @bitSizeOf(bool)) % 8);
|
||||||
|
|
||||||
const ErrorHandler = packed struct {
|
const ErrorHandler = packed struct {
|
||||||
has_error: bool = false,
|
has_error: bool = false,
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ pub fn setNumlock(val: bool) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn setUserContext(allocator: std.mem.Allocator, entry: UsernameEntry) !void {
|
pub fn setUserContext(allocator: std.mem.Allocator, entry: UsernameEntry) !void {
|
||||||
const username_z = try allocator.dupeSentinel(u8, entry.username.?, 0);
|
const username_z = try allocator.dupeZ(u8, entry.username.?);
|
||||||
defer allocator.free(username_z);
|
defer allocator.free(username_z);
|
||||||
|
|
||||||
return platform_struct.setUserContextImpl(username_z.ptr, entry);
|
return platform_struct.setUserContextImpl(username_z.ptr, entry);
|
||||||
@@ -392,10 +392,10 @@ pub fn setUserShell(entry: *UsernameEntry) void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn setEnvironmentVariable(allocator: std.mem.Allocator, name: []const u8, value: []const u8, replace: bool) !void {
|
pub fn setEnvironmentVariable(allocator: std.mem.Allocator, name: []const u8, value: []const u8, replace: bool) !void {
|
||||||
const name_z = try allocator.dupeSentinel(u8, name, 0);
|
const name_z = try allocator.dupeZ(u8, name);
|
||||||
defer allocator.free(name_z);
|
defer allocator.free(name_z);
|
||||||
|
|
||||||
const value_z = try allocator.dupeSentinel(u8, value, 0);
|
const value_z = try allocator.dupeZ(u8, value);
|
||||||
defer allocator.free(value_z);
|
defer allocator.free(value_z);
|
||||||
|
|
||||||
const status = stdlib.setenv(name_z.ptr, value_z.ptr, @intFromBool(replace));
|
const status = stdlib.setenv(name_z.ptr, value_z.ptr, @intFromBool(replace));
|
||||||
@@ -422,7 +422,7 @@ pub fn getNextUsernameEntry() ?UsernameEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn getUsernameEntry(allocator: std.mem.Allocator, username: []const u8) ?UsernameEntry {
|
pub fn getUsernameEntry(allocator: std.mem.Allocator, username: []const u8) ?UsernameEntry {
|
||||||
const username_z = allocator.dupeSentinel(u8, username, 0) catch return null;
|
const username_z = allocator.dupeZ(u8, username) catch return null;
|
||||||
defer allocator.free(username_z);
|
defer allocator.free(username_z);
|
||||||
|
|
||||||
const entry = pwd.getpwnam(username_z);
|
const entry = pwd.getpwnam(username_z);
|
||||||
|
|||||||
@@ -131,11 +131,13 @@ pub fn LuaParser(comptime Struct: type) type {
|
|||||||
var arena = std.heap.ArenaAllocator.init(allocator);
|
var arena = std.heap.ArenaAllocator.init(allocator);
|
||||||
const arena_alloc = arena.allocator();
|
const arena_alloc = arena.allocator();
|
||||||
|
|
||||||
|
var maybe_load_error: ?anyerror = null;
|
||||||
|
errdefer |err| maybe_load_error = err;
|
||||||
|
|
||||||
const data = parseLua(arena_alloc, path) catch load_error: {
|
const data = parseLua(arena_alloc, path) catch load_error: {
|
||||||
break :load_error Struct{};
|
break :load_error Struct{};
|
||||||
};
|
};
|
||||||
|
|
||||||
var maybe_load_error: ?anyerror = null;
|
|
||||||
if (global_errors.items.len != 0) {
|
if (global_errors.items.len != 0) {
|
||||||
maybe_load_error = error.InvalidConfig;
|
maybe_load_error = error.InvalidConfig;
|
||||||
}
|
}
|
||||||
@@ -174,8 +176,8 @@ pub fn LuaParser(comptime Struct: type) type {
|
|||||||
defer lua.pop(1); // pop ly table
|
defer lua.pop(1); // pop ly table
|
||||||
if (ly_type == .nil) return error.MissingLyTable;
|
if (ly_type == .nil) return error.MissingLyTable;
|
||||||
|
|
||||||
inline for (struc.field_names, struc.field_types) |name, ftype| {
|
inline for (struc.fields) |field| {
|
||||||
try setField(allocator, lua, name, ftype, &data);
|
try setField(allocator, lua, field, &data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
else => @compileError("Expected a struct."),
|
else => @compileError("Expected a struct."),
|
||||||
@@ -186,61 +188,39 @@ pub fn LuaParser(comptime Struct: type) type {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setField(
|
pub fn setField(allocator: std.mem.Allocator, lua: *Lua, comptime field: std.builtin.Type.StructField, data: *Struct) !void {
|
||||||
allocator: std.mem.Allocator,
|
const type_info = @typeInfo(field.type);
|
||||||
lua: *Lua,
|
|
||||||
comptime field_name: [:0]const u8,
|
|
||||||
field_type: type,
|
|
||||||
data: *Struct,
|
|
||||||
) !void {
|
|
||||||
return setFieldInner(
|
|
||||||
allocator,
|
|
||||||
lua,
|
|
||||||
field_name,
|
|
||||||
field_type,
|
|
||||||
data,
|
|
||||||
) catch |err| {
|
|
||||||
const value = lua.toString(-1) catch "";
|
|
||||||
const duped = allocator.dupe(u8, value) catch "";
|
|
||||||
errorHandler(@typeName(field_type), field_name, duped, err);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
fn setFieldInner(
|
|
||||||
allocator: std.mem.Allocator,
|
|
||||||
lua: *Lua,
|
|
||||||
comptime field_name: [:0]const u8,
|
|
||||||
field_type: type,
|
|
||||||
data: *Struct,
|
|
||||||
) !void {
|
|
||||||
const type_info = @typeInfo(field_type);
|
|
||||||
const actual_type, const is_optional = blk: {
|
const actual_type, const is_optional = blk: {
|
||||||
if (type_info == .optional) {
|
if (type_info == .optional) {
|
||||||
break :blk .{ type_info.optional.child, true };
|
break :blk .{ type_info.optional.child, true };
|
||||||
}
|
}
|
||||||
break :blk .{ field_type, false };
|
break :blk .{ field.type, false };
|
||||||
};
|
};
|
||||||
// push value to top of stack
|
// push value to top of stack
|
||||||
_ = lua.getField(-1, field_name);
|
_ = lua.getField(-1, field.name);
|
||||||
defer lua.pop(1);
|
defer lua.pop(1);
|
||||||
|
|
||||||
// handle null, i.e. undefined fields
|
// handle null, i.e. undefined fields
|
||||||
if (is_optional and lua.isNil(-1)) {
|
if (is_optional and lua.isNil(-1)) {
|
||||||
@field(data, field_name) = null;
|
@field(data, field.name) = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle missing required fields
|
// handle missing required fields
|
||||||
if (lua.isNil(-1)) {
|
if (lua.isNil(-1)) return;
|
||||||
return error.MissingRequiredField;
|
|
||||||
}
|
|
||||||
const actual_type_info = @typeInfo(actual_type);
|
const actual_type_info = @typeInfo(actual_type);
|
||||||
|
|
||||||
|
errdefer |err| {
|
||||||
|
const value = lua.toString(-1) catch "";
|
||||||
|
const duped = allocator.dupe(u8, value) catch "";
|
||||||
|
errorHandler(@typeName(field.type), field.name, duped, err);
|
||||||
|
}
|
||||||
|
|
||||||
// dispatch depending on type
|
// dispatch depending on type
|
||||||
if (actual_type_info == .int and is_optional) {
|
if (actual_type_info == .int and is_optional) {
|
||||||
if (lua.isNumber(-1)) {
|
if (lua.isNumber(-1)) {
|
||||||
const value = try lua.toNumber(-1);
|
const value = try lua.toNumber(-1);
|
||||||
@field(data, field_name) = @trunc(value);
|
@field(data, field.name) = @trunc(value);
|
||||||
} else {
|
} else {
|
||||||
const str = try lua.toString(-1);
|
const str = try lua.toString(-1);
|
||||||
|
|
||||||
@@ -251,13 +231,13 @@ pub fn LuaParser(comptime Struct: type) type {
|
|||||||
|
|
||||||
if (iter.nextCodepoint() != null) return error.ExpectedSingleCharacter;
|
if (iter.nextCodepoint() != null) return error.ExpectedSingleCharacter;
|
||||||
|
|
||||||
@field(data, field_name) = if (codepoint) |cp| @intCast(cp) else null;
|
@field(data, field.name) = if (codepoint) |cp| @intCast(cp) else null;
|
||||||
}
|
}
|
||||||
// non null integer
|
// non null integer
|
||||||
} else if (actual_type_info == .int) {
|
} else if (actual_type_info == .int) {
|
||||||
if (lua.isNumber(-1)) {
|
if (lua.isNumber(-1)) {
|
||||||
const value = try lua.toNumber(-1);
|
const value = try lua.toNumber(-1);
|
||||||
@field(data, field_name) = @trunc(value);
|
@field(data, field.name) = @trunc(value);
|
||||||
} else {
|
} else {
|
||||||
const str = try lua.toString(-1);
|
const str = try lua.toString(-1);
|
||||||
|
|
||||||
@@ -268,27 +248,27 @@ pub fn LuaParser(comptime Struct: type) type {
|
|||||||
|
|
||||||
if (iter.nextCodepoint() != null) return error.ExpectedSingleCharacter;
|
if (iter.nextCodepoint() != null) return error.ExpectedSingleCharacter;
|
||||||
|
|
||||||
@field(data, field_name) = @intCast(codepoint);
|
@field(data, field.name) = @intCast(codepoint);
|
||||||
}
|
}
|
||||||
} else if (actual_type_info == .float) { // all floats
|
} else if (actual_type_info == .float) { // all floats
|
||||||
const value = try lua.toNumber(-1);
|
const value = try lua.toNumber(-1);
|
||||||
@field(data, field_name) = @floatCast(value);
|
@field(data, field.name) = @floatCast(value);
|
||||||
} else if (actual_type_info == .bool) {
|
} else if (actual_type_info == .bool) {
|
||||||
if (!lua.isBoolean(-1)) return error.ExpectedBoolean;
|
if (!lua.isBoolean(-1)) return error.ExpectedBoolean;
|
||||||
const value = lua.toBoolean(-1);
|
const value = lua.toBoolean(-1);
|
||||||
@field(data, field_name) = value;
|
@field(data, field.name) = value;
|
||||||
} else if (actual_type == []const u8) {
|
} else if (actual_type == []const u8) {
|
||||||
const value = try lua.toString(-1);
|
const value = try lua.toString(-1);
|
||||||
const duped = try allocator.dupe(u8, value);
|
const duped = try allocator.dupe(u8, value);
|
||||||
@field(data, field_name) = duped;
|
@field(data, field.name) = duped;
|
||||||
} else if (actual_type == [:0]const u8) {
|
} else if (actual_type == [:0]const u8) {
|
||||||
const value = try lua.toString(-1);
|
const value = try lua.toString(-1);
|
||||||
const duped = try allocator.dupeSentinel(u8, value, 0);
|
const duped = try allocator.dupeSentinel(u8, value, 0);
|
||||||
@field(data, field_name) = duped;
|
@field(data, field.name) = duped;
|
||||||
} else if (actual_type_info == .@"enum") {
|
} else if (actual_type_info == .@"enum") {
|
||||||
const value = try lua.toString(-1);
|
const value = try lua.toString(-1);
|
||||||
const variant = std.meta.stringToEnum(actual_type, value) orelse return error.InvalidVariant;
|
const variant = std.meta.stringToEnum(actual_type, value) orelse return error.InvalidVariant;
|
||||||
@field(data, field_name) = variant;
|
@field(data, field.name) = variant;
|
||||||
} else unreachable;
|
} else unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ pub fn build(b: *std.Build) void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
const translate_c_dep = b.dependency("translate_c", .{});
|
const translate_c_dep = b.dependency("translate_c", .{
|
||||||
|
.target = target,
|
||||||
|
});
|
||||||
|
|
||||||
const termbox2: Translator = .init(translate_c_dep, .{
|
const termbox2: Translator = .init(translate_c_dep, .{
|
||||||
.c_source_file = termbox_dep.path("termbox2.h"),
|
.c_source_file = termbox_dep.path("termbox2.h"),
|
||||||
@@ -36,7 +38,18 @@ pub fn build(b: *std.Build) void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
termbox2.defineCMacro("TB_IMPL", null);
|
termbox2.defineCMacro("TB_IMPL", null);
|
||||||
|
// TODO 0.16.0: Workaround until Aro gets better...
|
||||||
|
// https://codeberg.org/ziglang/translate-c/issues/319
|
||||||
|
termbox2.defineCMacro("_XOPEN_SOURCE", "700");
|
||||||
termbox2.defineCMacro("TB_OPT_ATTR_W", "32"); // Enable 24-bit color support + styling (32-bit)
|
termbox2.defineCMacro("TB_OPT_ATTR_W", "32"); // Enable 24-bit color support + styling (32-bit)
|
||||||
|
// TODO 0.16.0: Including <fcntl.h> with -OReleaseSafe causes
|
||||||
|
// __attribute__(__error__()) to be called. Below
|
||||||
|
// is the workaround.
|
||||||
|
termbox2.defineCMacro("_FORTIFY_SOURCE", "0");
|
||||||
|
// TODO 0.16.0: Needed for now
|
||||||
|
if (target.result.os.tag == .freebsd) {
|
||||||
|
termbox2.defineCMacro("__BSD_VISIBLE", "1");
|
||||||
|
}
|
||||||
mod.addImport("termbox2", termbox2.mod);
|
mod.addImport("termbox2", termbox2.mod);
|
||||||
|
|
||||||
const mod_tests = b.addTest(.{
|
const mod_tests = b.addTest(.{
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
.name = .ly_ui,
|
.name = .ly_ui,
|
||||||
.version = "1.2.0",
|
.version = "1.2.0",
|
||||||
.fingerprint = 0x8d11bf85a74ec803,
|
.fingerprint = 0x8d11bf85a74ec803,
|
||||||
.minimum_zig_version = "0.17.0",
|
.minimum_zig_version = "0.16.0",
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.ly_core = .{
|
.ly_core = .{
|
||||||
.path = "../ly-core",
|
.path = "../ly-core",
|
||||||
},
|
},
|
||||||
.termbox2 = .{
|
.termbox2 = .{
|
||||||
.url = "git+https://github.com/AnErrupTion/termbox2?ref=master#496730697c662893eec43192f48ff616c2539da6",
|
.url = "git+https://github.com/AnErrupTion/termbox2?ref=master#c7f241e8888ce243e1748b05c26a42fcfaaad936",
|
||||||
.hash = "N-V-__8AAOEWBQDt5tNdIzIFY6n8DdZsCP-6MyLoNS20wgpA",
|
.hash = "N-V-__8AAAUXBQD6Fwpi9m0MBqWXFFaqW5l1lVrJC2Ynj7a-",
|
||||||
},
|
},
|
||||||
.translate_c = .{
|
.translate_c = .{
|
||||||
.url = "git+https://codeberg.org/ziglang/translate-c?ref=master#3da873cacdd7e9190fe1cf40372ddf5387c970ea",
|
.url = "git+https://codeberg.org/ziglang/translate-c?ref=zig-0.16.x#6fe0ffc4549f15c5f2d9432c2b4460ba90ff85ac",
|
||||||
.hash = "translate_c-0.0.0-Q_BUWktLBwBO7VLbmrOKUcAMRtE5fmOxI35189X5XbJs",
|
.hash = "translate_c-1.0.0-Q_BUWo_5BgD4flHdUhA31zOz0XvZk9k7lQv1ouzyNXj2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|||||||
@@ -262,6 +262,13 @@ ly = {
|
|||||||
-- Default is red and bold
|
-- Default is red and bold
|
||||||
error_fg = 0x01FF0000,
|
error_fg = 0x01FF0000,
|
||||||
|
|
||||||
|
-- Tally directory for the pam_faillock module (if present)
|
||||||
|
-- Used for getting if an account is locked or not after too many failed
|
||||||
|
-- login attempts
|
||||||
|
-- If directory doesn't exist, lock status won't be checked when
|
||||||
|
-- authenticating
|
||||||
|
faillock_tally_dir = "/var/run/faillock",
|
||||||
|
|
||||||
-- Foreground color id
|
-- Foreground color id
|
||||||
fg = 0x00FFFFFF,
|
fg = 0x00FFFFFF,
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = مخصص
|
|||||||
custom_info_err_output_long = الإخراج طويل جداً
|
custom_info_err_output_long = الإخراج طويل جداً
|
||||||
custom_info_err_no_output = لا يوجد إخراج
|
custom_info_err_no_output = لا يوجد إخراج
|
||||||
custom_info_err_no_output_error = ، خطأ محتمل
|
custom_info_err_no_output_error = ، خطأ محتمل
|
||||||
|
|
||||||
err_alloc = فشل في تخصيص الذاكرة
|
err_alloc = فشل في تخصيص الذاكرة
|
||||||
err_args = تعذر تحليل وسيطات سطر الأوامر
|
err_args = تعذر تحليل وسيطات سطر الأوامر
|
||||||
err_autologin_session = لم يتم العثور على جلسة تسجيل الدخول التلقائي
|
err_autologin_session = لم يتم العثور على جلسة تسجيل الدخول التلقائي
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = تم إلغاء معاملة PAM
|
|||||||
err_pam_acct_expired = الحساب منتهي الصلاحية
|
err_pam_acct_expired = الحساب منتهي الصلاحية
|
||||||
err_pam_auth = خطأ في المصادقة (Authentication error)
|
err_pam_auth = خطأ في المصادقة (Authentication error)
|
||||||
err_pam_authinfo_unavail = فشل في الحصول على معلومات المستخدم
|
err_pam_authinfo_unavail = فشل في الحصول على معلومات المستخدم
|
||||||
err_pam_authok_reqd = انتهت صلاحية رمز المصادقة (Token)
|
|
||||||
err_pam_buf = خطأ في ذاكرة التخزين المؤقت (Buffer)
|
err_pam_buf = خطأ في ذاكرة التخزين المؤقت (Buffer)
|
||||||
err_pam_cred_err = فشل في تعيين بيانات الاعتماد (Credentials)
|
err_pam_cred_err = فشل في تعيين بيانات الاعتماد (Credentials)
|
||||||
err_pam_cred_expired = بيانات الاعتماد منتهية الصلاحية
|
err_pam_cred_expired = بيانات الاعتماد منتهية الصلاحية
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = ايقاف التشغيل
|
shutdown = ايقاف التشغيل
|
||||||
sleep = وضع السكون
|
sleep = وضع السكون
|
||||||
toggle_password = إظهار/إخفاء كلمة المرور
|
toggle_password = إظهار/إخفاء كلمة المرور
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = персонализирано
|
|||||||
custom_info_err_output_long = резултатът е твърде дълъг
|
custom_info_err_output_long = резултатът е твърде дълъг
|
||||||
custom_info_err_no_output = няма резултат
|
custom_info_err_no_output = няма резултат
|
||||||
custom_info_err_no_output_error = , възможна грешка
|
custom_info_err_no_output_error = , възможна грешка
|
||||||
|
err_acc_locked = профилът е заключен, твърде много неуспешни опити
|
||||||
err_alloc = неуспешно заделяне на памет
|
err_alloc = неуспешно заделяне на памет
|
||||||
err_args = неуспешен анализ на аргументите от командния ред
|
err_args = неуспешен анализ на аргументите от командния ред
|
||||||
err_autologin_session = сесията за автоматично влизане не е намерена
|
err_autologin_session = сесията за автоматично влизане не е намерена
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = прекратена транзакция
|
|||||||
err_pam_acct_expired = изтекъл профил
|
err_pam_acct_expired = изтекъл профил
|
||||||
err_pam_auth = грешка при удостоверяването
|
err_pam_auth = грешка при удостоверяването
|
||||||
err_pam_authinfo_unavail = неуспешно получаване на информация за потребителя
|
err_pam_authinfo_unavail = неуспешно получаване на информация за потребителя
|
||||||
err_pam_authok_reqd = изтекъл жетон
|
|
||||||
err_pam_buf = грешка в буфера на паметта
|
err_pam_buf = грешка в буфера на паметта
|
||||||
err_pam_cred_err = неуспешно задаване на удостоверения
|
err_pam_cred_err = неуспешно задаване на удостоверения
|
||||||
err_pam_cred_expired = изтекли удостоверения
|
err_pam_cred_expired = изтекли удостоверения
|
||||||
@@ -77,6 +77,7 @@ shell = обвивка
|
|||||||
shutdown = изключване
|
shutdown = изключване
|
||||||
sleep = заспиване
|
sleep = заспиване
|
||||||
toggle_password = превключване на паролата
|
toggle_password = превключване на паролата
|
||||||
|
token_expired = паролата е изтекла, моля, нулирайте паролата си
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalitzat
|
|||||||
custom_info_err_output_long = sortida massa llarga
|
custom_info_err_output_long = sortida massa llarga
|
||||||
custom_info_err_no_output = sense sortida
|
custom_info_err_no_output = sense sortida
|
||||||
custom_info_err_no_output_error = , possible error
|
custom_info_err_no_output_error = , possible error
|
||||||
|
|
||||||
err_alloc = assignació de memòria fallida
|
err_alloc = assignació de memòria fallida
|
||||||
err_args = no s'han pogut analitzar els arguments de la línia d'ordres
|
err_args = no s'han pogut analitzar els arguments de la línia d'ordres
|
||||||
err_autologin_session = no s'ha trobat la sessió d'inici de sessió automàtic
|
err_autologin_session = no s'ha trobat la sessió d'inici de sessió automàtic
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transacció pam avortada
|
|||||||
err_pam_acct_expired = compte expirat
|
err_pam_acct_expired = compte expirat
|
||||||
err_pam_auth = error d'autenticació
|
err_pam_auth = error d'autenticació
|
||||||
err_pam_authinfo_unavail = error en obtenir la informació de l'usuari
|
err_pam_authinfo_unavail = error en obtenir la informació de l'usuari
|
||||||
err_pam_authok_reqd = token expirat
|
|
||||||
err_pam_buf = error en la memòria intermèdia
|
err_pam_buf = error en la memòria intermèdia
|
||||||
err_pam_cred_err = error en establir les credencials
|
err_pam_cred_err = error en establir les credencials
|
||||||
err_pam_cred_expired = credencials expirades
|
err_pam_cred_expired = credencials expirades
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = aturar
|
shutdown = aturar
|
||||||
sleep = suspendre
|
sleep = suspendre
|
||||||
toggle_password = mostrar/amagar contrasenya
|
toggle_password = mostrar/amagar contrasenya
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = vlastní
|
|||||||
custom_info_err_output_long = výstup je příliš dlouhý
|
custom_info_err_output_long = výstup je příliš dlouhý
|
||||||
custom_info_err_no_output = žádný výstup
|
custom_info_err_no_output = žádný výstup
|
||||||
custom_info_err_no_output_error = , možná chyba
|
custom_info_err_no_output_error = , možná chyba
|
||||||
|
|
||||||
err_alloc = alokace paměti selhala
|
err_alloc = alokace paměti selhala
|
||||||
err_args = nelze analyzovat argumenty příkazového řádku
|
err_args = nelze analyzovat argumenty příkazového řádku
|
||||||
err_autologin_session = relace automatického přihlášení nebyla nalezena
|
err_autologin_session = relace automatického přihlášení nebyla nalezena
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam transakce přerušena
|
|||||||
err_pam_acct_expired = platnost účtu vypršela
|
err_pam_acct_expired = platnost účtu vypršela
|
||||||
err_pam_auth = chyba autentizace
|
err_pam_auth = chyba autentizace
|
||||||
err_pam_authinfo_unavail = nelze získat informace o uživateli
|
err_pam_authinfo_unavail = nelze získat informace o uživateli
|
||||||
err_pam_authok_reqd = platnost tokenu vypršela
|
|
||||||
err_pam_buf = chyba vyrovnávací paměti
|
err_pam_buf = chyba vyrovnávací paměti
|
||||||
err_pam_cred_err = nelze nastavit pověření
|
err_pam_cred_err = nelze nastavit pověření
|
||||||
err_pam_cred_expired = platnost pověření vypršela
|
err_pam_cred_expired = platnost pověření vypršela
|
||||||
@@ -77,6 +77,7 @@ shell = příkazový řádek
|
|||||||
shutdown = vypnout
|
shutdown = vypnout
|
||||||
sleep = uspat
|
sleep = uspat
|
||||||
toggle_password = zobrazit/skrýt heslo
|
toggle_password = zobrazit/skrýt heslo
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = benutzerdefiniert
|
|||||||
custom_info_err_output_long = Ausgabe zu lang
|
custom_info_err_output_long = Ausgabe zu lang
|
||||||
custom_info_err_no_output = keine Ausgabe
|
custom_info_err_no_output = keine Ausgabe
|
||||||
custom_info_err_no_output_error = , möglicher Fehler
|
custom_info_err_no_output_error = , möglicher Fehler
|
||||||
|
|
||||||
err_alloc = Speicherzuweisung fehlgeschlagen
|
err_alloc = Speicherzuweisung fehlgeschlagen
|
||||||
err_args = Kommandozeilenargumente konnten nicht verarbeitet werden
|
err_args = Kommandozeilenargumente konnten nicht verarbeitet werden
|
||||||
err_autologin_session = Autologin-Sitzung nicht gefunden
|
err_autologin_session = Autologin-Sitzung nicht gefunden
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = PAM-Transaktion abgebrochen
|
|||||||
err_pam_acct_expired = Benutzerkonto abgelaufen
|
err_pam_acct_expired = Benutzerkonto abgelaufen
|
||||||
err_pam_auth = Authentifizierungsfehler
|
err_pam_auth = Authentifizierungsfehler
|
||||||
err_pam_authinfo_unavail = Abrufen der Benutzerinformationen fehlgeschlagen
|
err_pam_authinfo_unavail = Abrufen der Benutzerinformationen fehlgeschlagen
|
||||||
err_pam_authok_reqd = Passwort abgelaufen
|
|
||||||
err_pam_buf = Speicherpufferfehler
|
err_pam_buf = Speicherpufferfehler
|
||||||
err_pam_cred_err = Fehler beim Setzen der Anmeldedaten
|
err_pam_cred_err = Fehler beim Setzen der Anmeldedaten
|
||||||
err_pam_cred_expired = Anmeldedaten abgelaufen
|
err_pam_cred_expired = Anmeldedaten abgelaufen
|
||||||
@@ -77,6 +77,7 @@ shell = Shell
|
|||||||
shutdown = Herunterfahren
|
shutdown = Herunterfahren
|
||||||
sleep = Sleep
|
sleep = Sleep
|
||||||
toggle_password = Passwort anzeigen/verbergen
|
toggle_password = Passwort anzeigen/verbergen
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = custom
|
|||||||
custom_info_err_output_long = output too long
|
custom_info_err_output_long = output too long
|
||||||
custom_info_err_no_output = no output
|
custom_info_err_no_output = no output
|
||||||
custom_info_err_no_output_error = , possible error
|
custom_info_err_no_output_error = , possible error
|
||||||
|
err_acc_locked = account locked, too many attempts
|
||||||
err_alloc = failed memory allocation
|
err_alloc = failed memory allocation
|
||||||
err_args = unable to parse command line arguments
|
err_args = unable to parse command line arguments
|
||||||
err_autologin_session = autologin session not found
|
err_autologin_session = autologin session not found
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam transaction aborted
|
|||||||
err_pam_acct_expired = account expired
|
err_pam_acct_expired = account expired
|
||||||
err_pam_auth = authentication error
|
err_pam_auth = authentication error
|
||||||
err_pam_authinfo_unavail = failed to get user info
|
err_pam_authinfo_unavail = failed to get user info
|
||||||
err_pam_authok_reqd = token expired
|
|
||||||
err_pam_buf = memory buffer error
|
err_pam_buf = memory buffer error
|
||||||
err_pam_cred_err = failed to set credentials
|
err_pam_cred_err = failed to set credentials
|
||||||
err_pam_cred_expired = credentials expired
|
err_pam_cred_expired = credentials expired
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = shutdown
|
shutdown = shutdown
|
||||||
sleep = sleep
|
sleep = sleep
|
||||||
toggle_password = toggle password
|
toggle_password = toggle password
|
||||||
|
token_expired = password expired, please reset
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
authenticating = aŭtentigado...
|
authenticating = aŭtentigante...
|
||||||
brightness_down = malpliigi helecon
|
brightness_down = malpliigi helecon
|
||||||
brightness_up = pliigi helecon
|
brightness_up = pliigi helecon
|
||||||
capslock = majuskla baskulo
|
capslock = majuskla baskulo
|
||||||
custom = propra
|
custom = propra
|
||||||
custom_info_err_output_long = eligo tro longa
|
custom_info_err_output_long = eligo estas tro longa
|
||||||
custom_info_err_no_output = neniu eligo
|
custom_info_err_no_output = neniu eligo
|
||||||
custom_info_err_no_output_error = , ebla eraro
|
custom_info_err_no_output_error = , ebla eraro
|
||||||
err_alloc = malsukcesis memorasignon
|
err_acc_locked = konto ŝlosiĝis, tro multaj provoj
|
||||||
|
err_alloc = malsukcesis memorasigno
|
||||||
err_args = ne povas analizi argumentojn de komanda linio
|
err_args = ne povas analizi argumentojn de komanda linio
|
||||||
err_autologin_session = aŭtomatan ensalutan seancon ne trovis
|
err_autologin_session = aŭtomata ensaluta seanco ne troviĝis
|
||||||
err_bounds = indico estas ekster-intervala
|
err_bounds = indico estas ekster la limoj
|
||||||
err_brightness_change = malsukcesis ŝanĝi la helecon
|
err_brightness_change = malsukcesis ŝanĝi la helecon
|
||||||
err_chdir = malsukcesis malfermi hejman dosierujon
|
err_chdir = malsukcesis malfermi hejman dosierujon
|
||||||
err_clock_too_long = horloĝa ĉeno estas tro longa
|
err_clock_too_long = horloĝa ĉeno estas tro longa
|
||||||
@@ -17,33 +18,32 @@ err_config = ne povas analizi agordan dosieron
|
|||||||
err_crawl = malsukcesis dum serĉado de seancaj dosierujoj
|
err_crawl = malsukcesis dum serĉado de seancaj dosierujoj
|
||||||
err_dgn_oob = protokola mesaĝo
|
err_dgn_oob = protokola mesaĝo
|
||||||
err_domain = malvalida domajno
|
err_domain = malvalida domajno
|
||||||
err_empty_password = ne akceptas malplenan pasvorton
|
err_empty_password = malplena pasvorto malpermesiĝas
|
||||||
err_envlist = malsukcesis preni la medivariablojn
|
err_envlist = malsukcesis preni la medivariablojn
|
||||||
err_get_active_tty = malsukcesis preni la aktivan TTY-on
|
err_get_active_tty = malsukcesis preni la aktivan TTY
|
||||||
err_hibernate = malsukcesis ruli la komandon por diskodormo
|
err_hibernate = malsukcesis ruli la komandon por diskodormo
|
||||||
err_hostname = malsukcesis preni la sistemnomon
|
err_hostname = malsukcesis preni la sistemnomon
|
||||||
err_inactivity = malsukcesis ruli la agorditan komandon por malaktiveco
|
err_inactivity = malsukcesis ruli la komandon de malaktiveco
|
||||||
err_lock_state = malsukcesis preni la ŝlosan staton
|
err_lock_state = malsukcesis preni la ŝlosan staton
|
||||||
err_log = malsukcesis malfermi la protokolan dosieron
|
err_log = malsukcesis malfermi la protokolan dosieron
|
||||||
err_mlock = malsukcesis ŝlosi pasvortan memoron
|
err_mlock = malsukcesis ŝlosi pasvortan memoron
|
||||||
err_null = nula memorloko
|
err_null = nula referenco
|
||||||
err_numlock = malsukcesis agordi numeran baskulon
|
err_numlock = malsukcesis agordi nombran baskulon
|
||||||
err_pam = PAM-a transakcio malsukcesis
|
err_pam = PAM transakcio malsukcesis
|
||||||
err_pam_abort = PAM-a transakcio malsukcesis
|
err_pam_abort = PAM transakcio malsukcesis
|
||||||
err_pam_acct_expired = konto eksvalidiĝis
|
err_pam_acct_expired = konto eksvalidiĝis
|
||||||
err_pam_auth = aŭtentiga eraro
|
err_pam_auth = aŭtentiga eraro
|
||||||
err_pam_authinfo_unavail = malsukcesis preni uzantajn informojn
|
err_pam_authinfo_unavail = malsukcesis preni uzantajn informojn
|
||||||
err_pam_authok_reqd = memorsigno eksvalidiĝis
|
err_pam_buf = memorbufra eraro
|
||||||
err_pam_buf = bufra eraro
|
err_pam_cred_err = malsukcesis agordi akreditilojn
|
||||||
err_pam_cred_err = malsukcesis agordi akreditaĵon
|
err_pam_cred_expired = akreditiloj eksvalidiĝis
|
||||||
err_pam_cred_expired = akreditaĵo eksvalidiĝis
|
err_pam_cred_insufficient = nesufiĉaj akreditiloj
|
||||||
err_pam_cred_insufficient = nesufiĉa akreditaĵo
|
err_pam_cred_unavail = malsukcesis preni akreditilojn
|
||||||
err_pam_cred_unavail = malsukcesis preni akreditaĵon
|
err_pam_maxtries = atingis limon da provoj
|
||||||
err_pam_maxtries = atingis maksimuman kvanton da provoj
|
|
||||||
err_pam_perm_denied = permeso negis
|
err_pam_perm_denied = permeso negis
|
||||||
err_pam_session = seancan eraron
|
err_pam_session = seanca eraro
|
||||||
err_pam_sys = sisteman eraron
|
err_pam_sys = sistema eraro
|
||||||
err_pam_user_unknown = ne konas uzanton
|
err_pam_user_unknown = nekonita uzanto
|
||||||
err_path = malsukcesis agordi la median dosierindikon
|
err_path = malsukcesis agordi la median dosierindikon
|
||||||
err_perm_dir = malsukcesis ŝanĝi la nunan dosierujon
|
err_perm_dir = malsukcesis ŝanĝi la nunan dosierujon
|
||||||
err_perm_group = malsukcesis redukti grupajn permesojn
|
err_perm_group = malsukcesis redukti grupajn permesojn
|
||||||
@@ -52,22 +52,22 @@ err_pwnam = malsukcesis preni uzantajn informojn
|
|||||||
err_sleep = malsukcesis ruli memordorman komandon
|
err_sleep = malsukcesis ruli memordorman komandon
|
||||||
err_start = malsukcesis ruli startan komandon
|
err_start = malsukcesis ruli startan komandon
|
||||||
err_battery = malsukcesis ŝargi baterian staton
|
err_battery = malsukcesis ŝargi baterian staton
|
||||||
err_switch_tty = malsukcesis ŝanĝi TTY-on
|
err_switch_tty = malsukcesis ŝanĝi TTY
|
||||||
err_tty_ctrl = TTY-an stiran transigon malsukcesis
|
err_tty_ctrl = stira transigo de TTY malsukcesis
|
||||||
err_no_users = nul uzantojn trovas
|
err_no_users = neniu uzanto troviĝas
|
||||||
err_uid_range = malsukcesis dinamike preni UID-an intervalon
|
err_uid_range = malsukcesis dinamike preni intervalon de UID
|
||||||
err_user_gid = malsukcesis agordi uzantan GID-on
|
err_user_gid = malsukcesis agordi uzantan GID
|
||||||
err_user_init = malsukcesis iniciĝi uzanto
|
err_user_init = malsukcesis pravalorizi uzanton
|
||||||
err_user_uid = malsukcesis agordi uzantan UID-on
|
err_user_uid = malsukcesis agordi uzantan UID
|
||||||
err_xauth = malsukcesis plenumi je xauth
|
err_xauth = malsukcesis plenumi xauth
|
||||||
err_xcb_conn = malsukcesis dum konectado al xcb
|
err_xcb_conn = malsukcesis konekti al xcb
|
||||||
err_xsessions_dir = malsukcesis trovi seancan dosierujon
|
err_xsessions_dir = malsukcesis trovi seancan dosierujon
|
||||||
err_xsessions_open = malsukcesis malfermi seancan dosierujon
|
err_xsessions_open = malsukcesis malfermi seancan dosierujon
|
||||||
hibernate = diskodormi
|
hibernate = diskodormi
|
||||||
insert = enmeti
|
insert = enmeti
|
||||||
login = uzanto
|
login = uzanto
|
||||||
logout = elsalutis
|
logout = elsalutis
|
||||||
no_x11_support = x11 estas foriĝita de kompil-tempo
|
no_x11_support = x11 estis forigita dum kompilado
|
||||||
normal = normala
|
normal = normala
|
||||||
numlock = numera baskulo
|
numlock = numera baskulo
|
||||||
other = alia
|
other = alia
|
||||||
@@ -77,6 +77,7 @@ shell = ŝelo
|
|||||||
shutdown = malŝalti
|
shutdown = malŝalti
|
||||||
sleep = memordormi
|
sleep = memordormi
|
||||||
toggle_password = montri/kaŝi pasvorton
|
toggle_password = montri/kaŝi pasvorton
|
||||||
|
token_expired = pasvorto eksvalidiĝis, bonvolu reagordi ĝin
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalizado
|
|||||||
custom_info_err_output_long = salida demasiado larga
|
custom_info_err_output_long = salida demasiado larga
|
||||||
custom_info_err_no_output = sin salida
|
custom_info_err_no_output = sin salida
|
||||||
custom_info_err_no_output_error = , posible error
|
custom_info_err_no_output_error = , posible error
|
||||||
|
|
||||||
err_alloc = asignación de memoria fallida
|
err_alloc = asignación de memoria fallida
|
||||||
err_args = no se pudieron analizar los argumentos de la línea de comandos
|
err_args = no se pudieron analizar los argumentos de la línea de comandos
|
||||||
err_autologin_session = no se encontró la sesión de inicio de sesión automático
|
err_autologin_session = no se encontró la sesión de inicio de sesión automático
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transacción pam abortada
|
|||||||
err_pam_acct_expired = cuenta expirada
|
err_pam_acct_expired = cuenta expirada
|
||||||
err_pam_auth = error de autenticación
|
err_pam_auth = error de autenticación
|
||||||
err_pam_authinfo_unavail = error al obtener información del usuario
|
err_pam_authinfo_unavail = error al obtener información del usuario
|
||||||
err_pam_authok_reqd = token expirado
|
|
||||||
err_pam_buf = error de la memoria intermedia
|
err_pam_buf = error de la memoria intermedia
|
||||||
err_pam_cred_err = error al establecer las credenciales
|
err_pam_cred_err = error al establecer las credenciales
|
||||||
err_pam_cred_expired = credenciales expiradas
|
err_pam_cred_expired = credenciales expiradas
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = apagar
|
shutdown = apagar
|
||||||
sleep = suspender
|
sleep = suspender
|
||||||
toggle_password = mostrar/ocultar contraseña
|
toggle_password = mostrar/ocultar contraseña
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = customisé
|
|||||||
custom_info_err_output_long = sortie trop longue
|
custom_info_err_output_long = sortie trop longue
|
||||||
custom_info_err_no_output = pas de sortie
|
custom_info_err_no_output = pas de sortie
|
||||||
custom_info_err_no_output_error = , erreur possible
|
custom_info_err_no_output_error = , erreur possible
|
||||||
|
err_acc_locked = compte bloqué, trop de tentatives
|
||||||
err_alloc = échec d'allocation mémoire
|
err_alloc = échec d'allocation mémoire
|
||||||
err_args = échec de l'analyse des arguments en lignes de commande
|
err_args = échec de l'analyse des arguments en lignes de commande
|
||||||
err_autologin_session = session de connexion automatique introuvable
|
err_autologin_session = session de connexion automatique introuvable
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transaction pam avortée
|
|||||||
err_pam_acct_expired = compte expiré
|
err_pam_acct_expired = compte expiré
|
||||||
err_pam_auth = erreur d'authentification
|
err_pam_auth = erreur d'authentification
|
||||||
err_pam_authinfo_unavail = échec de l'obtention des infos utilisateur
|
err_pam_authinfo_unavail = échec de l'obtention des infos utilisateur
|
||||||
err_pam_authok_reqd = tiquet expiré
|
|
||||||
err_pam_buf = erreur de mémoire tampon
|
err_pam_buf = erreur de mémoire tampon
|
||||||
err_pam_cred_err = échec de la modification des identifiants
|
err_pam_cred_err = échec de la modification des identifiants
|
||||||
err_pam_cred_expired = identifiants expirés
|
err_pam_cred_expired = identifiants expirés
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = éteindre
|
shutdown = éteindre
|
||||||
sleep = veille
|
sleep = veille
|
||||||
toggle_password = afficher le mot de passe
|
toggle_password = afficher le mot de passe
|
||||||
|
token_expired = mot de passe expiré, veuillez le changer
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalizzato
|
|||||||
custom_info_err_output_long = output troppo lungo
|
custom_info_err_output_long = output troppo lungo
|
||||||
custom_info_err_no_output = nessun output
|
custom_info_err_no_output = nessun output
|
||||||
custom_info_err_no_output_error = , possibile errore
|
custom_info_err_no_output_error = , possibile errore
|
||||||
|
|
||||||
err_alloc = impossibile allocare memoria
|
err_alloc = impossibile allocare memoria
|
||||||
err_args = impossibile analizzare gli argomenti della riga di comando
|
err_args = impossibile analizzare gli argomenti della riga di comando
|
||||||
err_autologin_session = sessione di accesso automatico non trovata
|
err_autologin_session = sessione di accesso automatico non trovata
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transazione PAM interrotta
|
|||||||
err_pam_acct_expired = account scaduto
|
err_pam_acct_expired = account scaduto
|
||||||
err_pam_auth = errore di autenticazione
|
err_pam_auth = errore di autenticazione
|
||||||
err_pam_authinfo_unavail = impossibile ottenere informazioni utente
|
err_pam_authinfo_unavail = impossibile ottenere informazioni utente
|
||||||
err_pam_authok_reqd = token scaduto
|
|
||||||
err_pam_buf = errore buffer memoria
|
err_pam_buf = errore buffer memoria
|
||||||
err_pam_cred_err = impossibile impostare credenziali
|
err_pam_cred_err = impossibile impostare credenziali
|
||||||
err_pam_cred_expired = credenziali scadute
|
err_pam_cred_expired = credenziali scadute
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = arresto
|
shutdown = arresto
|
||||||
sleep = sospendi
|
sleep = sospendi
|
||||||
toggle_password = mostra/nascondi password
|
toggle_password = mostra/nascondi password
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = カスタム
|
|||||||
custom_info_err_output_long = 出力が長すぎます
|
custom_info_err_output_long = 出力が長すぎます
|
||||||
custom_info_err_no_output = 出力なし
|
custom_info_err_no_output = 出力なし
|
||||||
custom_info_err_no_output_error = 、エラーの可能性あり
|
custom_info_err_no_output_error = 、エラーの可能性あり
|
||||||
|
|
||||||
err_alloc = メモリ割り当て失敗
|
err_alloc = メモリ割り当て失敗
|
||||||
err_args = コマンドライン引数を解析できません
|
err_args = コマンドライン引数を解析できません
|
||||||
err_autologin_session = 自動ログインセッションが見つかりません
|
err_autologin_session = 自動ログインセッションが見つかりません
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = PAMトランザクションが中断されました
|
|||||||
err_pam_acct_expired = アカウントの有効期限が切れています
|
err_pam_acct_expired = アカウントの有効期限が切れています
|
||||||
err_pam_auth = 認証エラー
|
err_pam_auth = 認証エラー
|
||||||
err_pam_authinfo_unavail = ユーザー情報の取得に失敗しました
|
err_pam_authinfo_unavail = ユーザー情報の取得に失敗しました
|
||||||
err_pam_authok_reqd = トークンの有効期限が切れています
|
|
||||||
err_pam_buf = メモリバッファエラー
|
err_pam_buf = メモリバッファエラー
|
||||||
err_pam_cred_err = 認証情報の設定に失敗しました
|
err_pam_cred_err = 認証情報の設定に失敗しました
|
||||||
err_pam_cred_expired = 認証情報の有効期限が切れています
|
err_pam_cred_expired = 認証情報の有効期限が切れています
|
||||||
@@ -77,6 +77,7 @@ shell = シェル
|
|||||||
shutdown = シャットダウン
|
shutdown = シャットダウン
|
||||||
sleep = スリープ
|
sleep = スリープ
|
||||||
toggle_password = パスワードの表示/非表示
|
toggle_password = パスワードの表示/非表示
|
||||||
|
|
||||||
wayland = Wayland
|
wayland = Wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = kesane
|
|||||||
custom_info_err_output_long = encam pir dirêj e
|
custom_info_err_output_long = encam pir dirêj e
|
||||||
custom_info_err_no_output = encam tune
|
custom_info_err_no_output = encam tune
|
||||||
custom_info_err_no_output_error = , xeletiya mimkun
|
custom_info_err_no_output_error = , xeletiya mimkun
|
||||||
|
|
||||||
err_alloc = veqetandina bîrê têk çû
|
err_alloc = veqetandina bîrê têk çû
|
||||||
err_args = argumanên rêzika fermanê nehatin analîzkirin
|
err_args = argumanên rêzika fermanê nehatin analîzkirin
|
||||||
err_autologin_session = danişîna têketina xweber nehate dîtin
|
err_autologin_session = danişîna têketina xweber nehate dîtin
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = danûstendina pam hate têkbirin
|
|||||||
err_pam_acct_expired = dema jimarê derbas bûye
|
err_pam_acct_expired = dema jimarê derbas bûye
|
||||||
err_pam_auth = şaşetiya piştrastkirinê
|
err_pam_auth = şaşetiya piştrastkirinê
|
||||||
err_pam_authinfo_unavail = zanyariyên bikarhêner nehatin girtin
|
err_pam_authinfo_unavail = zanyariyên bikarhêner nehatin girtin
|
||||||
err_pam_authok_reqd = dema nîşandanê derbas bûye
|
|
||||||
err_pam_buf = şaşetiya bîra demkî
|
err_pam_buf = şaşetiya bîra demkî
|
||||||
err_pam_cred_err = sazkirina rastkitinê têk çû
|
err_pam_cred_err = sazkirina rastkitinê têk çû
|
||||||
err_pam_cred_expired = dema rastkitinê derbas bûye
|
err_pam_cred_expired = dema rastkitinê derbas bûye
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = vemirîne
|
shutdown = vemirîne
|
||||||
sleep = têxîne xewê
|
sleep = têxîne xewê
|
||||||
toggle_password = şîfre nîşan bide/veşêre
|
toggle_password = şîfre nîşan bide/veşêre
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = pielāgots
|
|||||||
custom_info_err_output_long = izvade pārāk gara
|
custom_info_err_output_long = izvade pārāk gara
|
||||||
custom_info_err_no_output = nav izvades
|
custom_info_err_no_output = nav izvades
|
||||||
custom_info_err_no_output_error = , iespējama kļūda
|
custom_info_err_no_output_error = , iespējama kļūda
|
||||||
|
|
||||||
err_alloc = neizdevās atmiņas piešķiršana
|
err_alloc = neizdevās atmiņas piešķiršana
|
||||||
err_args = nevar parsēt komandrindas argumentus
|
err_args = nevar parsēt komandrindas argumentus
|
||||||
err_autologin_session = automātiskās pieteikšanās sesija nav atrasta
|
err_autologin_session = automātiskās pieteikšanās sesija nav atrasta
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam transakcija pārtraukta
|
|||||||
err_pam_acct_expired = konts novecojis
|
err_pam_acct_expired = konts novecojis
|
||||||
err_pam_auth = autentifikācijas kļūda
|
err_pam_auth = autentifikācijas kļūda
|
||||||
err_pam_authinfo_unavail = neizdevās iegūt lietotāja informāciju
|
err_pam_authinfo_unavail = neizdevās iegūt lietotāja informāciju
|
||||||
err_pam_authok_reqd = žetons beidzies
|
|
||||||
err_pam_buf = atmiņas bufera kļūda
|
err_pam_buf = atmiņas bufera kļūda
|
||||||
err_pam_cred_err = neizdevās iestatīt akreditācijas datus
|
err_pam_cred_err = neizdevās iestatīt akreditācijas datus
|
||||||
err_pam_cred_expired = akreditācijas dati novecojuši
|
err_pam_cred_expired = akreditācijas dati novecojuši
|
||||||
@@ -77,6 +77,7 @@ shell = terminālis
|
|||||||
shutdown = izslēgt
|
shutdown = izslēgt
|
||||||
sleep = snauda
|
sleep = snauda
|
||||||
toggle_password = rādīt/slēpt paroli
|
toggle_password = rādīt/slēpt paroli
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = własny
|
|||||||
custom_info_err_output_long = wyjście zbyt długie
|
custom_info_err_output_long = wyjście zbyt długie
|
||||||
custom_info_err_no_output = brak wyjścia
|
custom_info_err_no_output = brak wyjścia
|
||||||
custom_info_err_no_output_error = , możliwy błąd
|
custom_info_err_no_output_error = , możliwy błąd
|
||||||
|
|
||||||
err_alloc = nieudana alokacja pamięci
|
err_alloc = nieudana alokacja pamięci
|
||||||
err_args = nie można przetworzyć argumentów wiersza poleceń
|
err_args = nie można przetworzyć argumentów wiersza poleceń
|
||||||
err_autologin_session = nie znaleziono sesji autologowania
|
err_autologin_session = nie znaleziono sesji autologowania
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transakcja pam przerwana
|
|||||||
err_pam_acct_expired = konto wygasło
|
err_pam_acct_expired = konto wygasło
|
||||||
err_pam_auth = błąd uwierzytelniania
|
err_pam_auth = błąd uwierzytelniania
|
||||||
err_pam_authinfo_unavail = nie udało się zdobyć informacji o użytkowniku
|
err_pam_authinfo_unavail = nie udało się zdobyć informacji o użytkowniku
|
||||||
err_pam_authok_reqd = token wygasł
|
|
||||||
err_pam_buf = błąd bufora pamięci
|
err_pam_buf = błąd bufora pamięci
|
||||||
err_pam_cred_err = nie udało się ustawić uwierzytelnienia
|
err_pam_cred_err = nie udało się ustawić uwierzytelnienia
|
||||||
err_pam_cred_expired = uwierzytelnienie wygasło
|
err_pam_cred_expired = uwierzytelnienie wygasło
|
||||||
@@ -77,6 +77,7 @@ shell = powłoka
|
|||||||
shutdown = wyłącz
|
shutdown = wyłącz
|
||||||
sleep = uśpij
|
sleep = uśpij
|
||||||
toggle_password = Pokaż/ukryj hasło
|
toggle_password = Pokaż/ukryj hasło
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalizado
|
|||||||
custom_info_err_output_long = saída demasiado longa
|
custom_info_err_output_long = saída demasiado longa
|
||||||
custom_info_err_no_output = sem saída
|
custom_info_err_no_output = sem saída
|
||||||
custom_info_err_no_output_error = , possível erro
|
custom_info_err_no_output_error = , possível erro
|
||||||
|
|
||||||
err_alloc = erro na atribuição de memória
|
err_alloc = erro na atribuição de memória
|
||||||
err_args = não foi possível analisar os argumentos da linha de comandos
|
err_args = não foi possível analisar os argumentos da linha de comandos
|
||||||
err_autologin_session = sessão de início de sessão automático não encontrada
|
err_autologin_session = sessão de início de sessão automático não encontrada
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transação pam abortada
|
|||||||
err_pam_acct_expired = conta expirada
|
err_pam_acct_expired = conta expirada
|
||||||
err_pam_auth = erro de autenticação
|
err_pam_auth = erro de autenticação
|
||||||
err_pam_authinfo_unavail = erro ao obter informação do utilizador
|
err_pam_authinfo_unavail = erro ao obter informação do utilizador
|
||||||
err_pam_authok_reqd = token expirado
|
|
||||||
err_pam_buf = erro de buffer de memória
|
err_pam_buf = erro de buffer de memória
|
||||||
err_pam_cred_err = erro ao definir credenciais
|
err_pam_cred_err = erro ao definir credenciais
|
||||||
err_pam_cred_expired = credenciais expiradas
|
err_pam_cred_expired = credenciais expiradas
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = encerrar
|
shutdown = encerrar
|
||||||
sleep = suspender
|
sleep = suspender
|
||||||
toggle_password = mostrar/ocultar palavra-passe
|
toggle_password = mostrar/ocultar palavra-passe
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalizado
|
|||||||
custom_info_err_output_long = saída muito longa
|
custom_info_err_output_long = saída muito longa
|
||||||
custom_info_err_no_output = sem saída
|
custom_info_err_no_output = sem saída
|
||||||
custom_info_err_no_output_error = , possível erro
|
custom_info_err_no_output_error = , possível erro
|
||||||
|
|
||||||
err_alloc = alocação de memória malsucedida
|
err_alloc = alocação de memória malsucedida
|
||||||
err_args = não foi possível analisar os argumentos da linha de comando
|
err_args = não foi possível analisar os argumentos da linha de comando
|
||||||
err_autologin_session = sessão de login automático não encontrada
|
err_autologin_session = sessão de login automático não encontrada
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = transação pam abortada
|
|||||||
err_pam_acct_expired = conta expirada
|
err_pam_acct_expired = conta expirada
|
||||||
err_pam_auth = erro de autenticação
|
err_pam_auth = erro de autenticação
|
||||||
err_pam_authinfo_unavail = não foi possível obter informações do usuário
|
err_pam_authinfo_unavail = não foi possível obter informações do usuário
|
||||||
err_pam_authok_reqd = token expirado
|
|
||||||
err_pam_buf = erro de buffer de memória
|
err_pam_buf = erro de buffer de memória
|
||||||
err_pam_cred_err = erro para definir credenciais
|
err_pam_cred_err = erro para definir credenciais
|
||||||
err_pam_cred_expired = credenciais expiradas
|
err_pam_cred_expired = credenciais expiradas
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = desligar
|
shutdown = desligar
|
||||||
sleep = suspender
|
sleep = suspender
|
||||||
toggle_password = mostrar/ocultar senha
|
toggle_password = mostrar/ocultar senha
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = personalizat
|
|||||||
custom_info_err_output_long = ieșire prea lungă
|
custom_info_err_output_long = ieșire prea lungă
|
||||||
custom_info_err_no_output = fără ieșire
|
custom_info_err_no_output = fără ieșire
|
||||||
custom_info_err_no_output_error = , posibil eroare
|
custom_info_err_no_output_error = , posibil eroare
|
||||||
|
|
||||||
err_alloc = alocare de memorie eșuată
|
err_alloc = alocare de memorie eșuată
|
||||||
err_args = imposibil de analizat argumentele liniei de comandă
|
err_args = imposibil de analizat argumentele liniei de comandă
|
||||||
err_autologin_session = sesiunea de autentificare automată nu a fost găsită
|
err_autologin_session = sesiunea de autentificare automată nu a fost găsită
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = tranzacţie pam anulată
|
|||||||
err_pam_acct_expired = cont expirat
|
err_pam_acct_expired = cont expirat
|
||||||
err_pam_auth = eroare de autentificare
|
err_pam_auth = eroare de autentificare
|
||||||
err_pam_authinfo_unavail = nu s-au putut obţine informaţii despre utilizator
|
err_pam_authinfo_unavail = nu s-au putut obţine informaţii despre utilizator
|
||||||
err_pam_authok_reqd = token expirat
|
|
||||||
err_pam_buf = eroare de memorie (buffer)
|
err_pam_buf = eroare de memorie (buffer)
|
||||||
err_pam_cred_err = nu s-au putut seta date de identificare (credentials)
|
err_pam_cred_err = nu s-au putut seta date de identificare (credentials)
|
||||||
err_pam_cred_expired = datele de identificare (credentials) au expirat
|
err_pam_cred_expired = datele de identificare (credentials) au expirat
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = opreşte sistemul
|
shutdown = opreşte sistemul
|
||||||
sleep = repaus
|
sleep = repaus
|
||||||
toggle_password = afișare/ascundere parolă
|
toggle_password = afișare/ascundere parolă
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = пользовательский
|
|||||||
custom_info_err_output_long = вывод слишком длинный
|
custom_info_err_output_long = вывод слишком длинный
|
||||||
custom_info_err_no_output = нет вывода
|
custom_info_err_no_output = нет вывода
|
||||||
custom_info_err_no_output_error = , возможная ошибка
|
custom_info_err_no_output_error = , возможная ошибка
|
||||||
|
|
||||||
err_alloc = не удалось выделить память
|
err_alloc = не удалось выделить память
|
||||||
err_args = не удалось разобрать аргументы командной строки
|
err_args = не удалось разобрать аргументы командной строки
|
||||||
err_autologin_session = не найдена сессия с автологином
|
err_autologin_session = не найдена сессия с автологином
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam транзакция прервана
|
|||||||
err_pam_acct_expired = срок действия аккаунта истёк
|
err_pam_acct_expired = срок действия аккаунта истёк
|
||||||
err_pam_auth = ошибка аутентификации
|
err_pam_auth = ошибка аутентификации
|
||||||
err_pam_authinfo_unavail = не удалось получить информацию о пользователе
|
err_pam_authinfo_unavail = не удалось получить информацию о пользователе
|
||||||
err_pam_authok_reqd = токен истёк
|
|
||||||
err_pam_buf = ошибка буфера памяти
|
err_pam_buf = ошибка буфера памяти
|
||||||
err_pam_cred_err = не удалось установить полномочия
|
err_pam_cred_err = не удалось установить полномочия
|
||||||
err_pam_cred_expired = полномочия истекли
|
err_pam_cred_expired = полномочия истекли
|
||||||
@@ -77,6 +77,7 @@ shell = оболочка
|
|||||||
shutdown = выключить
|
shutdown = выключить
|
||||||
sleep = сон
|
sleep = сон
|
||||||
toggle_password = показать/скрыть пароль
|
toggle_password = показать/скрыть пароль
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = prilagođeno
|
|||||||
custom_info_err_output_long = izlaz predugačak
|
custom_info_err_output_long = izlaz predugačak
|
||||||
custom_info_err_no_output = nema izlaza
|
custom_info_err_no_output = nema izlaza
|
||||||
custom_info_err_no_output_error = , moguća greška
|
custom_info_err_no_output_error = , moguća greška
|
||||||
|
|
||||||
err_alloc = neuspješna alokacija memorije
|
err_alloc = neuspješna alokacija memorije
|
||||||
err_args = nije moguće raščlaniti argumente komandne linije
|
err_args = nije moguće raščlaniti argumente komandne linije
|
||||||
err_autologin_session = sesija automatske prijave nije pronađena
|
err_autologin_session = sesija automatske prijave nije pronađena
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam transakcija prekinuta
|
|||||||
err_pam_acct_expired = nalog istekao
|
err_pam_acct_expired = nalog istekao
|
||||||
err_pam_auth = greška pri autentikaciji
|
err_pam_auth = greška pri autentikaciji
|
||||||
err_pam_authinfo_unavail = neuspješno uzimanje informacija o korisniku
|
err_pam_authinfo_unavail = neuspješno uzimanje informacija o korisniku
|
||||||
err_pam_authok_reqd = token istekao
|
|
||||||
err_pam_buf = greška bafera memorije
|
err_pam_buf = greška bafera memorije
|
||||||
err_pam_cred_err = neuspješno postavljanje kredencijala
|
err_pam_cred_err = neuspješno postavljanje kredencijala
|
||||||
err_pam_cred_expired = kredencijali istekli
|
err_pam_cred_expired = kredencijali istekli
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = ugasi
|
shutdown = ugasi
|
||||||
sleep = uspavaj
|
sleep = uspavaj
|
||||||
toggle_password = prikaži/sakrij lozinku
|
toggle_password = prikaži/sakrij lozinku
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = прилагођено
|
|||||||
custom_info_err_output_long = излаз предугачак
|
custom_info_err_output_long = излаз предугачак
|
||||||
custom_info_err_no_output = нема излаза
|
custom_info_err_no_output = нема излаза
|
||||||
custom_info_err_no_output_error = , могућа грешка
|
custom_info_err_no_output_error = , могућа грешка
|
||||||
|
|
||||||
err_alloc = неуспешна алокација меморије
|
err_alloc = неуспешна алокација меморије
|
||||||
err_args = није могуће рашчланити аргументе командне линије
|
err_args = није могуће рашчланити аргументе командне линије
|
||||||
err_autologin_session = сесија аутоматске пријаве није пронађена
|
err_autologin_session = сесија аутоматске пријаве није пронађена
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam трансакција прекинута
|
|||||||
err_pam_acct_expired = налог истекао
|
err_pam_acct_expired = налог истекао
|
||||||
err_pam_auth = грешка при аутентикацији
|
err_pam_auth = грешка при аутентикацији
|
||||||
err_pam_authinfo_unavail = неуспешно узимање информација о кориснику
|
err_pam_authinfo_unavail = неуспешно узимање информација о кориснику
|
||||||
err_pam_authok_reqd = токен истекао
|
|
||||||
err_pam_buf = грешка бафера меморије
|
err_pam_buf = грешка бафера меморије
|
||||||
err_pam_cred_err = неуспешно постављање акредитива
|
err_pam_cred_err = неуспешно постављање акредитива
|
||||||
err_pam_cred_expired = акредитиви истекли
|
err_pam_cred_expired = акредитиви истекли
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = угаси
|
shutdown = угаси
|
||||||
sleep = успавај
|
sleep = успавај
|
||||||
toggle_password = прикажи/сакриј лозинку
|
toggle_password = прикажи/сакриј лозинку
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = anpassad
|
|||||||
custom_info_err_output_long = utdata för lång
|
custom_info_err_output_long = utdata för lång
|
||||||
custom_info_err_no_output = ingen utdata
|
custom_info_err_no_output = ingen utdata
|
||||||
custom_info_err_no_output_error = , möjligt fel
|
custom_info_err_no_output_error = , möjligt fel
|
||||||
|
|
||||||
err_alloc = minnesallokering misslyckades
|
err_alloc = minnesallokering misslyckades
|
||||||
err_args = tolkning av kommandoargument misslyckades
|
err_args = tolkning av kommandoargument misslyckades
|
||||||
err_autologin_session = autologin-session hittades inte
|
err_autologin_session = autologin-session hittades inte
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam-transaktion avbröts
|
|||||||
err_pam_acct_expired = kontot har löpt ut
|
err_pam_acct_expired = kontot har löpt ut
|
||||||
err_pam_auth = autentisering misslyckades
|
err_pam_auth = autentisering misslyckades
|
||||||
err_pam_authinfo_unavail = hämtning av användarinformation misslyckades
|
err_pam_authinfo_unavail = hämtning av användarinformation misslyckades
|
||||||
err_pam_authok_reqd = token har löpt ut
|
|
||||||
err_pam_buf = minnesbufferfel
|
err_pam_buf = minnesbufferfel
|
||||||
err_pam_cred_err = inställning av inloggningsuppgifter misslyckades
|
err_pam_cred_err = inställning av inloggningsuppgifter misslyckades
|
||||||
err_pam_cred_expired = inloggningsuppgifterna har löpt ut
|
err_pam_cred_expired = inloggningsuppgifterna har löpt ut
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = stäng av
|
shutdown = stäng av
|
||||||
sleep = viloläge
|
sleep = viloläge
|
||||||
toggle_password = visa/dölj lösenord
|
toggle_password = visa/dölj lösenord
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = özel
|
|||||||
custom_info_err_output_long = çıktı çok uzun
|
custom_info_err_output_long = çıktı çok uzun
|
||||||
custom_info_err_no_output = çıktı yok
|
custom_info_err_no_output = çıktı yok
|
||||||
custom_info_err_no_output_error = , olası hata
|
custom_info_err_no_output_error = , olası hata
|
||||||
|
|
||||||
err_alloc = basarisiz bellek ayirma
|
err_alloc = basarisiz bellek ayirma
|
||||||
err_args = komut satırı argümanları ayrıştırılamıyor
|
err_args = komut satırı argümanları ayrıştırılamıyor
|
||||||
err_autologin_session = otomatik oturum açma oturumu bulunamadı
|
err_autologin_session = otomatik oturum açma oturumu bulunamadı
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam islemi durduruldu
|
|||||||
err_pam_acct_expired = hesabin suresi dolmus
|
err_pam_acct_expired = hesabin suresi dolmus
|
||||||
err_pam_auth = kimlik dogrulama hatasi
|
err_pam_auth = kimlik dogrulama hatasi
|
||||||
err_pam_authinfo_unavail = kullanici bilgileri getirilirken hata olustu
|
err_pam_authinfo_unavail = kullanici bilgileri getirilirken hata olustu
|
||||||
err_pam_authok_reqd = suresi dolmus token
|
|
||||||
err_pam_buf = bellek arabellegi hatasi
|
err_pam_buf = bellek arabellegi hatasi
|
||||||
err_pam_cred_err = kimlik bilgileri ayarlanamadi
|
err_pam_cred_err = kimlik bilgileri ayarlanamadi
|
||||||
err_pam_cred_expired = kimlik bilgilerinin suresi dolmus
|
err_pam_cred_expired = kimlik bilgilerinin suresi dolmus
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = makineyi kapat
|
shutdown = makineyi kapat
|
||||||
sleep = uykuya al
|
sleep = uykuya al
|
||||||
toggle_password = parolayı göster/gizle
|
toggle_password = parolayı göster/gizle
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = власний
|
|||||||
custom_info_err_output_long = вивід занадто довгий
|
custom_info_err_output_long = вивід занадто довгий
|
||||||
custom_info_err_no_output = немає виводу
|
custom_info_err_no_output = немає виводу
|
||||||
custom_info_err_no_output_error = , можлива помилка
|
custom_info_err_no_output_error = , можлива помилка
|
||||||
|
|
||||||
err_alloc = невдале виділення пам'яті
|
err_alloc = невдале виділення пам'яті
|
||||||
err_args = не вдалося розібрати аргументи командного рядка
|
err_args = не вдалося розібрати аргументи командного рядка
|
||||||
err_autologin_session = сеанс автоматичного входу не знайдено
|
err_autologin_session = сеанс автоматичного входу не знайдено
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = pam транзакція перервана
|
|||||||
err_pam_acct_expired = термін дії акаунту вичерпано
|
err_pam_acct_expired = термін дії акаунту вичерпано
|
||||||
err_pam_auth = помилка автентифікації
|
err_pam_auth = помилка автентифікації
|
||||||
err_pam_authinfo_unavail = не вдалося отримати дані користувача
|
err_pam_authinfo_unavail = не вдалося отримати дані користувача
|
||||||
err_pam_authok_reqd = термін дії токена вичерпано
|
|
||||||
err_pam_buf = помилка буферу пам'яті
|
err_pam_buf = помилка буферу пам'яті
|
||||||
err_pam_cred_err = не вдалося змінити облікові дані
|
err_pam_cred_err = не вдалося змінити облікові дані
|
||||||
err_pam_cred_expired = термін дії повноважень вичерпано
|
err_pam_cred_expired = термін дії повноважень вичерпано
|
||||||
@@ -77,6 +77,7 @@ shell = оболонка
|
|||||||
shutdown = вимкнути
|
shutdown = вимкнути
|
||||||
sleep = сплячий режим
|
sleep = сплячий режим
|
||||||
toggle_password = показати/приховати пароль
|
toggle_password = показати/приховати пароль
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = 自定义
|
|||||||
custom_info_err_output_long = 输出过长
|
custom_info_err_output_long = 输出过长
|
||||||
custom_info_err_no_output = 无输出
|
custom_info_err_no_output = 无输出
|
||||||
custom_info_err_no_output_error = ,可能有错误
|
custom_info_err_no_output_error = ,可能有错误
|
||||||
|
|
||||||
err_alloc = 内存分配失败
|
err_alloc = 内存分配失败
|
||||||
err_args = 无法解析命令行参数
|
err_args = 无法解析命令行参数
|
||||||
err_autologin_session = 未找到自动登录会话
|
err_autologin_session = 未找到自动登录会话
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = PAM事务已中止
|
|||||||
err_pam_acct_expired = 帐户已过期
|
err_pam_acct_expired = 帐户已过期
|
||||||
err_pam_auth = 身份验证错误
|
err_pam_auth = 身份验证错误
|
||||||
err_pam_authinfo_unavail = 获取用户信息失败
|
err_pam_authinfo_unavail = 获取用户信息失败
|
||||||
err_pam_authok_reqd = 口令已过期
|
|
||||||
err_pam_buf = 内存缓冲区错误
|
err_pam_buf = 内存缓冲区错误
|
||||||
err_pam_cred_err = 设置凭据失败
|
err_pam_cred_err = 设置凭据失败
|
||||||
err_pam_cred_expired = 凭据已过期
|
err_pam_cred_expired = 凭据已过期
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = 关机
|
shutdown = 关机
|
||||||
sleep = 睡眠
|
sleep = 睡眠
|
||||||
toggle_password = 显示/隐藏密码
|
toggle_password = 显示/隐藏密码
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ custom = 自訂
|
|||||||
custom_info_err_output_long = 輸出過長
|
custom_info_err_output_long = 輸出過長
|
||||||
custom_info_err_no_output = 無輸出
|
custom_info_err_no_output = 無輸出
|
||||||
custom_info_err_no_output_error = ,可能有錯誤
|
custom_info_err_no_output_error = ,可能有錯誤
|
||||||
|
|
||||||
err_alloc = 記憶體配置失敗
|
err_alloc = 記憶體配置失敗
|
||||||
err_args = 無法解析命令列參數
|
err_args = 無法解析命令列參數
|
||||||
err_autologin_session = 找不到自動登入工作階段
|
err_autologin_session = 找不到自動登入工作階段
|
||||||
@@ -33,7 +34,6 @@ err_pam_abort = PAM 交易已中止
|
|||||||
err_pam_acct_expired = 帳號已過期
|
err_pam_acct_expired = 帳號已過期
|
||||||
err_pam_auth = 驗證錯誤
|
err_pam_auth = 驗證錯誤
|
||||||
err_pam_authinfo_unavail = 取得使用者資訊失敗
|
err_pam_authinfo_unavail = 取得使用者資訊失敗
|
||||||
err_pam_authok_reqd = 金鑰已過期
|
|
||||||
err_pam_buf = 記憶體緩衝區錯誤
|
err_pam_buf = 記憶體緩衝區錯誤
|
||||||
err_pam_cred_err = 設定憑證失敗
|
err_pam_cred_err = 設定憑證失敗
|
||||||
err_pam_cred_expired = 憑證已過期
|
err_pam_cred_expired = 憑證已過期
|
||||||
@@ -77,6 +77,7 @@ shell = shell
|
|||||||
shutdown = 關機
|
shutdown = 關機
|
||||||
sleep = 睡眠
|
sleep = 睡眠
|
||||||
toggle_password = 顯示/隱藏密碼
|
toggle_password = 顯示/隱藏密碼
|
||||||
|
|
||||||
wayland = wayland
|
wayland = wayland
|
||||||
x11 = x11
|
x11 = x11
|
||||||
xinitrc = xinitrc
|
xinitrc = xinitrc
|
||||||
|
|||||||
101
src/auth.zig
101
src/auth.zig
@@ -20,6 +20,7 @@ pub const AuthOptions = struct {
|
|||||||
xauth_cmd: []const u8,
|
xauth_cmd: []const u8,
|
||||||
setup_cmd: []const u8,
|
setup_cmd: []const u8,
|
||||||
login_cmd: ?[]const u8,
|
login_cmd: ?[]const u8,
|
||||||
|
faillock_tally_dir: []const u8,
|
||||||
x_cmd: []const u8,
|
x_cmd: []const u8,
|
||||||
x_vt: ?u8,
|
x_vt: ?u8,
|
||||||
session_pid: std.posix.pid_t,
|
session_pid: std.posix.pid_t,
|
||||||
@@ -29,11 +30,23 @@ pub const AuthOptions = struct {
|
|||||||
const PamAppdata = struct {
|
const PamAppdata = struct {
|
||||||
username: []const u8,
|
username: []const u8,
|
||||||
password: []const u8,
|
password: []const u8,
|
||||||
authreq_requested: bool,
|
new_authtok_requested: bool,
|
||||||
authreq_responded: bool,
|
authreq_responded: bool,
|
||||||
new_password: []const u8,
|
new_password: []const u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//https://github.com/linux-pam/linux-pam/blob/master/modules/pam_faillock/faillock.h#L55
|
||||||
|
const PamFaillockEntry = extern struct {
|
||||||
|
pub const STATUS_VALID: usize = 0x1;
|
||||||
|
pub const STATUS_RHOST: usize = 0x2;
|
||||||
|
pub const STATUS_TTY: usize = 0x4;
|
||||||
|
|
||||||
|
source: [52]u8,
|
||||||
|
reserved: u16,
|
||||||
|
status: u16,
|
||||||
|
time: u64,
|
||||||
|
};
|
||||||
|
|
||||||
var xorg_pid: std.posix.pid_t = 0;
|
var xorg_pid: std.posix.pid_t = 0;
|
||||||
pub fn xorgSignalHandler(sig: std.posix.SIG) callconv(.c) void {
|
pub fn xorgSignalHandler(sig: std.posix.SIG) callconv(.c) void {
|
||||||
if (xorg_pid > 0) _ = std.c.kill(xorg_pid, sig);
|
if (xorg_pid > 0) _ = std.c.kill(xorg_pid, sig);
|
||||||
@@ -52,12 +65,21 @@ pub fn authenticate(
|
|||||||
current_environment: Environment,
|
current_environment: Environment,
|
||||||
login: []const u8,
|
login: []const u8,
|
||||||
password: []const u8,
|
password: []const u8,
|
||||||
|
maybe_new_password: ?[]const u8,
|
||||||
) !void {
|
) !void {
|
||||||
|
const lock_path = try std.fs.path.join(allocator, &.{ options.faillock_tally_dir, login });
|
||||||
|
defer allocator.free(lock_path);
|
||||||
|
|
||||||
|
var faillock_entries: usize = 0;
|
||||||
|
if (try fileExists(io, lock_path)) {
|
||||||
|
faillock_entries = try getFaillockEntries(io, lock_path);
|
||||||
|
}
|
||||||
|
|
||||||
var tty_buffer: [3]u8 = undefined;
|
var tty_buffer: [3]u8 = undefined;
|
||||||
const tty_str = try std.fmt.bufPrint(&tty_buffer, "{d}", .{options.tty});
|
const tty_str = try std.fmt.bufPrint(&tty_buffer, "{d}", .{options.tty});
|
||||||
|
|
||||||
var pam_tty_buffer: [6]u8 = undefined;
|
var pam_tty_buffer: [6]u8 = undefined;
|
||||||
const pam_tty_str = try std.fmt.bufPrintSentinel(&pam_tty_buffer, "tty{d}", .{options.tty}, 0);
|
const pam_tty_str = try std.fmt.bufPrintZ(&pam_tty_buffer, "tty{d}", .{options.tty});
|
||||||
|
|
||||||
// Set the XDG environment variables
|
// Set the XDG environment variables
|
||||||
try log_file.info(io, "auth/env", "setting xdg environment variables", .{});
|
try log_file.info(io, "auth/env", "setting xdg environment variables", .{});
|
||||||
@@ -69,7 +91,7 @@ pub fn authenticate(
|
|||||||
var credentials: PamAppdata = .{
|
var credentials: PamAppdata = .{
|
||||||
.username = login,
|
.username = login,
|
||||||
.password = password,
|
.password = password,
|
||||||
.authreq_requested = false,
|
.new_authtok_requested = false,
|
||||||
.authreq_responded = false,
|
.authreq_responded = false,
|
||||||
.new_password = "",
|
.new_password = "",
|
||||||
};
|
};
|
||||||
@@ -93,14 +115,23 @@ pub fn authenticate(
|
|||||||
// Do the PAM routine
|
// Do the PAM routine
|
||||||
try log_file.info(io, "auth/pam", "authenticating", .{});
|
try log_file.info(io, "auth/pam", "authenticating", .{});
|
||||||
status = interop.pam.pam_authenticate(handle, 0);
|
status = interop.pam.pam_authenticate(handle, 0);
|
||||||
|
if (status == interop.pam.PAM_AUTH_ERR and try fileExists(io, lock_path)) {
|
||||||
|
const new_faillock_entries = try getFaillockEntries(io, lock_path);
|
||||||
|
|
||||||
|
if (faillock_entries == new_faillock_entries) {
|
||||||
|
return error.AccountLocked;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (status != interop.pam.PAM_SUCCESS) return pamDiagnose(status);
|
if (status != interop.pam.PAM_SUCCESS) return pamDiagnose(status);
|
||||||
|
|
||||||
try log_file.info(io, "auth/pam", "validating account", .{});
|
try log_file.info(io, "auth/pam", "validating account", .{});
|
||||||
status = interop.pam.pam_acct_mgmt(handle, 0);
|
status = interop.pam.pam_acct_mgmt(handle, 0);
|
||||||
if (status == interop.pam.PAM_NEW_AUTHTOK_REQD) {
|
if (status == interop.pam.PAM_NEW_AUTHTOK_REQD) {
|
||||||
// credentials.authreq_requested = true;
|
if (maybe_new_password) |new_passwsord| {
|
||||||
// credentials.new_password = "";
|
credentials.new_authtok_requested = true;
|
||||||
// status = interop.pam.pam_chauthtok(handle, interop.pam.PAM_CHANGE_EXPIRED_AUTHTOK);
|
credentials.new_password = new_passwsord;
|
||||||
|
status = interop.pam.pam_chauthtok(handle, interop.pam.PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (status != interop.pam.PAM_SUCCESS) return pamDiagnose(status);
|
if (status != interop.pam.PAM_SUCCESS) return pamDiagnose(status);
|
||||||
|
|
||||||
@@ -185,6 +216,38 @@ pub fn authenticate(
|
|||||||
if (shared_err.readError()) |err| return err;
|
if (shared_err.readError()) |err| return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn fileExists(io: std.Io, path: []const u8) !bool {
|
||||||
|
var file = std.Io.Dir.openFileAbsolute(io, path, .{}) catch |err| {
|
||||||
|
if (err == error.FileNotFound) return false;
|
||||||
|
return err;
|
||||||
|
};
|
||||||
|
defer file.close(io);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn getFaillockEntries(io: std.Io, path: []const u8) !usize {
|
||||||
|
var file = try std.Io.Dir.openFileAbsolute(io, path, .{});
|
||||||
|
defer file.close(io);
|
||||||
|
|
||||||
|
var buffer: [1024]u8 = undefined;
|
||||||
|
var reader = file.reader(io, &buffer);
|
||||||
|
var count: usize = 0;
|
||||||
|
|
||||||
|
while (!reader.atEnd()) {
|
||||||
|
const entry = reader.interface.takeStruct(PamFaillockEntry, .little) catch |err| {
|
||||||
|
if (err == error.EndOfStream) break;
|
||||||
|
return err;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (entry.status & PamFaillockEntry.STATUS_VALID != 0) {
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
fn startSession(
|
fn startSession(
|
||||||
log_file: *LogFile,
|
log_file: *LogFile,
|
||||||
allocator: std.mem.Allocator,
|
allocator: std.mem.Allocator,
|
||||||
@@ -221,7 +284,7 @@ fn startSession(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const home_z = try allocator.dupeSentinel(u8, user_entry.home.?, 0);
|
const home_z = try allocator.dupeZ(u8, user_entry.home.?);
|
||||||
defer allocator.free(home_z);
|
defer allocator.free(home_z);
|
||||||
|
|
||||||
// Change to the user's home directory
|
// Change to the user's home directory
|
||||||
@@ -326,7 +389,7 @@ fn loginConv(
|
|||||||
for (0..message_count) |i| set_credentials: {
|
for (0..message_count) |i| set_credentials: {
|
||||||
switch (messages[i].?.msg_style) {
|
switch (messages[i].?.msg_style) {
|
||||||
interop.pam.PAM_PROMPT_ECHO_ON => {
|
interop.pam.PAM_PROMPT_ECHO_ON => {
|
||||||
username = allocator.dupeSentinel(u8, data.username, 0) catch {
|
username = allocator.dupeZ(u8, data.username) catch {
|
||||||
status = interop.pam.PAM_BUF_ERR;
|
status = interop.pam.PAM_BUF_ERR;
|
||||||
break :set_credentials;
|
break :set_credentials;
|
||||||
};
|
};
|
||||||
@@ -334,14 +397,14 @@ fn loginConv(
|
|||||||
},
|
},
|
||||||
interop.pam.PAM_PROMPT_ECHO_OFF => {
|
interop.pam.PAM_PROMPT_ECHO_OFF => {
|
||||||
var pass = data.password;
|
var pass = data.password;
|
||||||
if (data.authreq_requested) {
|
if (data.new_authtok_requested) {
|
||||||
if (data.authreq_responded) {
|
if (data.authreq_responded) {
|
||||||
pass = data.new_password;
|
pass = data.new_password;
|
||||||
}
|
}
|
||||||
data.authreq_responded = true;
|
data.authreq_responded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
password = allocator.dupeSentinel(u8, pass, 0) catch {
|
password = allocator.dupeZ(u8, pass) catch {
|
||||||
status = interop.pam.PAM_BUF_ERR;
|
status = interop.pam.PAM_BUF_ERR;
|
||||||
break :set_credentials;
|
break :set_credentials;
|
||||||
};
|
};
|
||||||
@@ -362,7 +425,7 @@ fn getFreeDisplay() !u8 {
|
|||||||
var buf: [15]u8 = undefined;
|
var buf: [15]u8 = undefined;
|
||||||
var i: u8 = 0;
|
var i: u8 = 0;
|
||||||
while (i < 200) : (i += 1) {
|
while (i < 200) : (i += 1) {
|
||||||
const xlock = try std.fmt.bufPrintSentinel(&buf, "/tmp/.X{d}-lock", .{i}, 0);
|
const xlock = try std.fmt.bufPrintZ(&buf, "/tmp/.X{d}-lock", .{i});
|
||||||
if (interop.isError(std.posix.system.access(xlock.ptr, std.posix.F_OK))) break;
|
if (interop.isError(std.posix.system.access(xlock.ptr, std.posix.F_OK))) break;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -463,7 +526,7 @@ fn xauth(log_file: *LogFile, allocator: std.mem.Allocator, io: std.Io, display_n
|
|||||||
try log_file.reinit(io);
|
try log_file.reinit(io);
|
||||||
|
|
||||||
var cmd_buffer: [1024]u8 = undefined;
|
var cmd_buffer: [1024]u8 = undefined;
|
||||||
const cmd_str = std.fmt.bufPrintSentinel(&cmd_buffer, "{s} add {s} . {s}", .{ options.xauth_cmd, display_name, magic_cookie }, 0) catch std.process.exit(1);
|
const cmd_str = std.fmt.bufPrintZ(&cmd_buffer, "{s} add {s} . {s}", .{ options.xauth_cmd, display_name, magic_cookie }) catch std.process.exit(1);
|
||||||
|
|
||||||
try log_file.info(io, "auth/x11", "executing: {s} -c {s}", .{ shell, cmd_str });
|
try log_file.info(io, "auth/x11", "executing: {s} -c {s}", .{ shell, cmd_str });
|
||||||
const args = [_:null]?[*:0]const u8{ shell, "-c", cmd_str };
|
const args = [_:null]?[*:0]const u8{ shell, "-c", cmd_str };
|
||||||
@@ -499,7 +562,7 @@ fn executeX11Cmd(log_file: *LogFile, allocator: std.mem.Allocator, io: std.Io, s
|
|||||||
const display_name = try std.fmt.bufPrint(&buf, ":{d}", .{display_num});
|
const display_name = try std.fmt.bufPrint(&buf, ":{d}", .{display_num});
|
||||||
try log_file.info(io, "auth/x11", "got free display: {d}", .{display_num});
|
try log_file.info(io, "auth/x11", "got free display: {d}", .{display_num});
|
||||||
|
|
||||||
const shell_z = try allocator.dupeSentinel(u8, shell, 0);
|
const shell_z = try allocator.dupeZ(u8, shell);
|
||||||
defer allocator.free(shell_z);
|
defer allocator.free(shell_z);
|
||||||
|
|
||||||
try log_file.info(io, "auth/x11", "creating xauth file", .{});
|
try log_file.info(io, "auth/x11", "creating xauth file", .{});
|
||||||
@@ -509,7 +572,7 @@ fn executeX11Cmd(log_file: *LogFile, allocator: std.mem.Allocator, io: std.Io, s
|
|||||||
const pid = std.posix.system.fork();
|
const pid = std.posix.system.fork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
var cmd_buffer: [1024]u8 = undefined;
|
var cmd_buffer: [1024]u8 = undefined;
|
||||||
const cmd_str = std.fmt.bufPrintSentinel(&cmd_buffer, "{s} {s} {s} -auth {s}", .{ options.x_cmd, display_name, vt, xauthority }, 0) catch std.process.exit(1);
|
const cmd_str = std.fmt.bufPrintZ(&cmd_buffer, "{s} {s} {s} -auth {s}", .{ options.x_cmd, display_name, vt, xauthority }) catch std.process.exit(1);
|
||||||
try log_file.info(io, "auth/x11", "executing: {s} -c {s} -auth {s}", .{ shell, cmd_str, xauthority });
|
try log_file.info(io, "auth/x11", "executing: {s} -c {s} -auth {s}", .{ shell, cmd_str, xauthority });
|
||||||
|
|
||||||
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
||||||
@@ -538,7 +601,7 @@ fn executeX11Cmd(log_file: *LogFile, allocator: std.mem.Allocator, io: std.Io, s
|
|||||||
xorg_pid = std.posix.system.fork();
|
xorg_pid = std.posix.system.fork();
|
||||||
if (xorg_pid == 0) {
|
if (xorg_pid == 0) {
|
||||||
var cmd_buffer: [1024]u8 = undefined;
|
var cmd_buffer: [1024]u8 = undefined;
|
||||||
const cmd_str = std.fmt.bufPrintSentinel(&cmd_buffer, "{s} {s} {s} {s}", .{ if (options.use_kmscon_vt) "kmscon-launch-gui" else "", options.setup_cmd, options.login_cmd orelse "", desktop_cmd }, 0) catch std.process.exit(1);
|
const cmd_str = std.fmt.bufPrintZ(&cmd_buffer, "{s} {s} {s} {s}", .{ if (options.use_kmscon_vt) "kmscon-launch-gui" else "", options.setup_cmd, options.login_cmd orelse "", desktop_cmd }) catch std.process.exit(1);
|
||||||
try log_file.info(io, "auth/x11", "executing: {s} -c {s}", .{ shell, cmd_str });
|
try log_file.info(io, "auth/x11", "executing: {s} -c {s}", .{ shell, cmd_str });
|
||||||
|
|
||||||
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
||||||
@@ -589,11 +652,11 @@ fn executeCmd(global_log_file: *LogFile, allocator: std.mem.Allocator, io: std.I
|
|||||||
}
|
}
|
||||||
defer if (maybe_log_file) |log_file| log_file.close(io);
|
defer if (maybe_log_file) |log_file| log_file.close(io);
|
||||||
|
|
||||||
const shell_z = try allocator.dupeSentinel(u8, shell, 0);
|
const shell_z = try allocator.dupeZ(u8, shell);
|
||||||
defer allocator.free(shell_z);
|
defer allocator.free(shell_z);
|
||||||
|
|
||||||
var cmd_buffer: [1024]u8 = undefined;
|
var cmd_buffer: [1024]u8 = undefined;
|
||||||
const cmd_str = try std.fmt.bufPrintSentinel(&cmd_buffer, "{s} {s} {s} {s}", .{ if (!is_terminal and options.use_kmscon_vt) "kmscon-launch-gui" else "", options.setup_cmd, options.login_cmd orelse "", exec_cmd orelse shell }, 0);
|
const cmd_str = try std.fmt.bufPrintZ(&cmd_buffer, "{s} {s} {s} {s}", .{ if (!is_terminal and options.use_kmscon_vt) "kmscon-launch-gui" else "", options.setup_cmd, options.login_cmd orelse "", exec_cmd orelse shell });
|
||||||
|
|
||||||
try global_log_file.info(io, "auth/sys", "executing: {s} -c {s}", .{ shell, cmd_str });
|
try global_log_file.info(io, "auth/sys", "executing: {s} -c {s}", .{ shell, cmd_str });
|
||||||
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
const args = [_:null]?[*:0]const u8{ shell_z, "-c", cmd_str };
|
||||||
@@ -642,7 +705,7 @@ fn addUtmpEntry(io: std.Io, entry: *Utmp, username: []const u8, pid: c_int) !voi
|
|||||||
|
|
||||||
// Get the TTY name (i.e. without the /dev/ prefix)
|
// Get the TTY name (i.e. without the /dev/ prefix)
|
||||||
var ttyname_buf: [@sizeOf(@TypeOf(entry.ut_line))]u8 = undefined;
|
var ttyname_buf: [@sizeOf(@TypeOf(entry.ut_line))]u8 = undefined;
|
||||||
_ = try std.fmt.bufPrintSentinel(&ttyname_buf, "{s}", .{tty_path["/dev/".len..]}, 0);
|
_ = try std.fmt.bufPrintZ(&ttyname_buf, "{s}", .{tty_path["/dev/".len..]});
|
||||||
|
|
||||||
entry.ut_line = ttyname_buf;
|
entry.ut_line = ttyname_buf;
|
||||||
// Get the TTY ID (i.e. without the tty prefix) and truncate it to the size
|
// Get the TTY ID (i.e. without the tty prefix) and truncate it to the size
|
||||||
@@ -650,7 +713,7 @@ fn addUtmpEntry(io: std.Io, entry: *Utmp, username: []const u8, pid: c_int) !voi
|
|||||||
entry.ut_id = ttyname_buf["tty".len..(@sizeOf(@TypeOf(entry.ut_id)) + "tty".len)].*;
|
entry.ut_id = ttyname_buf["tty".len..(@sizeOf(@TypeOf(entry.ut_id)) + "tty".len)].*;
|
||||||
|
|
||||||
var username_buf: [@sizeOf(@TypeOf(entry.ut_user))]u8 = undefined;
|
var username_buf: [@sizeOf(@TypeOf(entry.ut_user))]u8 = undefined;
|
||||||
_ = try std.fmt.bufPrintSentinel(&username_buf, "{s}", .{username}, 0);
|
_ = try std.fmt.bufPrintZ(&username_buf, "{s}", .{username});
|
||||||
|
|
||||||
entry.ut_user = username_buf;
|
entry.ut_user = username_buf;
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ dur_y_offset: i32 = 0,
|
|||||||
edge_margin: u8 = 0,
|
edge_margin: u8 = 0,
|
||||||
error_bg: u32 = 0x00000000,
|
error_bg: u32 = 0x00000000,
|
||||||
error_fg: u32 = 0x01FF0000,
|
error_fg: u32 = 0x01FF0000,
|
||||||
|
faillock_tally_dir: []const u8 = "/var/run/faillock",
|
||||||
fg: u32 = 0x00FFFFFF,
|
fg: u32 = 0x00FFFFFF,
|
||||||
full_color: bool = true,
|
full_color: bool = true,
|
||||||
gameoflife_fg: u32 = 0x0000FF00,
|
gameoflife_fg: u32 = 0x0000FF00,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// NOTE: After editing this file, please run `/res/lang/normalize_lang_files.py`
|
// NOTE: After editing this file, please run `res/lang/normalize_lang_files.py`
|
||||||
// to update all the language files accordingly.
|
// to update all the language files accordingly.
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -11,6 +11,7 @@ custom: []const u8 = "custom",
|
|||||||
custom_info_err_output_long: []const u8 = "output too long",
|
custom_info_err_output_long: []const u8 = "output too long",
|
||||||
custom_info_err_no_output: []const u8 = "no output",
|
custom_info_err_no_output: []const u8 = "no output",
|
||||||
custom_info_err_no_output_error: []const u8 = ", possible error",
|
custom_info_err_no_output_error: []const u8 = ", possible error",
|
||||||
|
err_acc_locked: []const u8 = "account locked, too many attempts",
|
||||||
err_alloc: []const u8 = "failed memory allocation",
|
err_alloc: []const u8 = "failed memory allocation",
|
||||||
err_args: []const u8 = "unable to parse command line arguments",
|
err_args: []const u8 = "unable to parse command line arguments",
|
||||||
err_autologin_session: []const u8 = "autologin session not found",
|
err_autologin_session: []const u8 = "autologin session not found",
|
||||||
@@ -38,7 +39,6 @@ err_pam_abort: []const u8 = "pam transaction aborted",
|
|||||||
err_pam_acct_expired: []const u8 = "account expired",
|
err_pam_acct_expired: []const u8 = "account expired",
|
||||||
err_pam_auth: []const u8 = "authentication error",
|
err_pam_auth: []const u8 = "authentication error",
|
||||||
err_pam_authinfo_unavail: []const u8 = "failed to get user info",
|
err_pam_authinfo_unavail: []const u8 = "failed to get user info",
|
||||||
err_pam_authok_reqd: []const u8 = "token expired",
|
|
||||||
err_pam_buf: []const u8 = "memory buffer error",
|
err_pam_buf: []const u8 = "memory buffer error",
|
||||||
err_pam_cred_err: []const u8 = "failed to set credentials",
|
err_pam_cred_err: []const u8 = "failed to set credentials",
|
||||||
err_pam_cred_expired: []const u8 = "credentials expired",
|
err_pam_cred_expired: []const u8 = "credentials expired",
|
||||||
@@ -82,6 +82,7 @@ shell: [:0]const u8 = "shell",
|
|||||||
shutdown: []const u8 = "shutdown",
|
shutdown: []const u8 = "shutdown",
|
||||||
sleep: []const u8 = "sleep",
|
sleep: []const u8 = "sleep",
|
||||||
toggle_password: []const u8 = "toggle password",
|
toggle_password: []const u8 = "toggle password",
|
||||||
|
token_expired: []const u8 = "password expired, please reset",
|
||||||
wayland: []const u8 = "wayland",
|
wayland: []const u8 = "wayland",
|
||||||
x11: []const u8 = "x11",
|
x11: []const u8 = "x11",
|
||||||
xinitrc: [:0]const u8 = "xinitrc",
|
xinitrc: [:0]const u8 = "xinitrc",
|
||||||
|
|||||||
@@ -232,9 +232,7 @@ pub fn configFieldHandler(_: std.mem.Allocator, field: ini.IniField) ?ini.IniFie
|
|||||||
// on the progress of said interface, only to find out afterwards
|
// on the progress of said interface, only to find out afterwards
|
||||||
// that you have PROCRASTINATED on the efforts meant to enhance
|
// that you have PROCRASTINATED on the efforts meant to enhance
|
||||||
// configuration. Thus the requirement for this reminder larger
|
// configuration. Thus the requirement for this reminder larger
|
||||||
// compared to the two reminders regarding better methods of
|
// compared to the one regarding better methods of X termination.
|
||||||
// X termination detection and new usernames with existing
|
|
||||||
// save files.
|
|
||||||
//
|
//
|
||||||
// Thus is my que to leave this TODO at thy request,
|
// Thus is my que to leave this TODO at thy request,
|
||||||
//
|
//
|
||||||
|
|||||||
57
src/main.zig
57
src/main.zig
@@ -113,6 +113,7 @@ const UiState = struct {
|
|||||||
login_text: ?*Text,
|
login_text: ?*Text,
|
||||||
password: *Text,
|
password: *Text,
|
||||||
password_widget: *Widget,
|
password_widget: *Widget,
|
||||||
|
maybe_old_password: ?[]const u8,
|
||||||
insert_mode: bool,
|
insert_mode: bool,
|
||||||
edge_margin: Position,
|
edge_margin: Position,
|
||||||
config: Config,
|
config: Config,
|
||||||
@@ -154,8 +155,8 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var gpa: std.heap.DebugAllocator(.{
|
var gpa: std.heap.DebugAllocator(.{
|
||||||
.never_unmap = builtin.mode == .debug,
|
.never_unmap = builtin.mode == .Debug,
|
||||||
.retain_metadata = builtin.mode == .debug,
|
.retain_metadata = builtin.mode == .Debug,
|
||||||
}) = .init;
|
}) = .init;
|
||||||
defer if (gpa.deinit() == .leak) std.log.err("attention please, memory has been leaked!", .{});
|
defer if (gpa.deinit() == .leak) std.log.err("attention please, memory has been leaked!", .{});
|
||||||
|
|
||||||
@@ -333,7 +334,7 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
|
|
||||||
const username_line = reader.takeDelimiterInclusive('\n') catch break :read_save_file;
|
const username_line = reader.takeDelimiterInclusive('\n') catch break :read_save_file;
|
||||||
|
|
||||||
if (std.mem.containsAtLeastScalar(u8, username_line, '-', 1)) read_username: {
|
if (std.mem.containsAtLeastScalar2(u8, username_line, '-', 1)) read_username: {
|
||||||
var iterator = std.mem.splitScalar(u8, username_line[0..(username_line.len - 1)], '-');
|
var iterator = std.mem.splitScalar(u8, username_line[0..(username_line.len - 1)], '-');
|
||||||
if (iterator.next() == null) break :read_username; // Would be index
|
if (iterator.next() == null) break :read_username; // Would be index
|
||||||
|
|
||||||
@@ -889,6 +890,9 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
);
|
);
|
||||||
defer state.password_label.deinit();
|
defer state.password_label.deinit();
|
||||||
|
|
||||||
|
state.maybe_old_password = null;
|
||||||
|
defer if (state.maybe_old_password) |pass| state.allocator.free(pass);
|
||||||
|
|
||||||
state.insert_mode = !state.config.vi_mode or state.config.vi_default_mode == .insert;
|
state.insert_mode = !state.config.vi_mode or state.config.vi_default_mode == .insert;
|
||||||
|
|
||||||
state.password = try Text.init(
|
state.password = try Text.init(
|
||||||
@@ -1237,8 +1241,8 @@ pub fn main(init: std.process.Init) !void {
|
|||||||
var iter = custom.binds.iterator();
|
var iter = custom.binds.iterator();
|
||||||
while (iter.next()) |i| {
|
while (iter.next()) |i| {
|
||||||
var concat = try std.mem.concat(state.allocator, u8, &[_][]const u8{ i.key_ptr.*, " ", i.value_ptr.name });
|
var concat = try std.mem.concat(state.allocator, u8, &[_][]const u8{ i.key_ptr.*, " ", i.value_ptr.name });
|
||||||
inline for (@typeInfo(Lang).@"struct".field_names) |lang_key| {
|
inline for (@typeInfo(Lang).@"struct".fields) |lang_key| {
|
||||||
const new = try std.mem.replaceOwned(u8, state.allocator, concat, "$" ++ lang_key, @field(state.lang, lang_key));
|
const new = try std.mem.replaceOwned(u8, state.allocator, concat, "$" ++ lang_key.name, @field(state.lang, lang_key.name));
|
||||||
state.allocator.free(concat);
|
state.allocator.free(concat);
|
||||||
concat = new;
|
concat = new;
|
||||||
}
|
}
|
||||||
@@ -1610,6 +1614,7 @@ fn authenticate(ptr: *anyopaque) !bool {
|
|||||||
.xauth_cmd = state.config.xauth_cmd,
|
.xauth_cmd = state.config.xauth_cmd,
|
||||||
.setup_cmd = state.config.setup_cmd,
|
.setup_cmd = state.config.setup_cmd,
|
||||||
.login_cmd = state.config.login_cmd,
|
.login_cmd = state.config.login_cmd,
|
||||||
|
.faillock_tally_dir = state.config.faillock_tally_dir,
|
||||||
.x_cmd = state.config.x_cmd,
|
.x_cmd = state.config.x_cmd,
|
||||||
.x_vt = state.config.x_vt,
|
.x_vt = state.config.x_vt,
|
||||||
.session_pid = session_pid,
|
.session_pid = session_pid,
|
||||||
@@ -1633,7 +1638,8 @@ fn authenticate(ptr: *anyopaque) !bool {
|
|||||||
auth_options,
|
auth_options,
|
||||||
current_environment,
|
current_environment,
|
||||||
if (state.login_text) |box| box.text.items else state.login.?.getCurrentUsername(),
|
if (state.login_text) |box| box.text.items else state.login.?.getCurrentUsername(),
|
||||||
password_text,
|
if (state.maybe_old_password) |pass| pass else password_text,
|
||||||
|
if (state.maybe_old_password != null) password_text else null,
|
||||||
) catch |err| {
|
) catch |err| {
|
||||||
shared_err.writeError(err);
|
shared_err.writeError(err);
|
||||||
|
|
||||||
@@ -1645,12 +1651,19 @@ fn authenticate(ptr: *anyopaque) !bool {
|
|||||||
std.process.exit(0);
|
std.process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var session_status: c_int = undefined;
|
if (state.maybe_old_password) |pass| {
|
||||||
_ = std.posix.system.waitpid(session_pid, &session_status, 0);
|
state.allocator.free(pass);
|
||||||
// HACK: It seems like the session process is not exiting immediately after the waitpid call.
|
state.maybe_old_password = null;
|
||||||
// This is a workaround to ensure the session process has exited before re-initializing the TTY.
|
}
|
||||||
state.io.sleep(.fromSeconds(1), .real) catch {};
|
|
||||||
session_pid = -1;
|
if (session_pid != -1) {
|
||||||
|
var session_status: c_int = undefined;
|
||||||
|
_ = std.posix.system.waitpid(session_pid, &session_status, 0);
|
||||||
|
// HACK: It seems like the session process is not exiting immediately after the waitpid call.
|
||||||
|
// This is a workaround to ensure the session process has exited before re-initializing the TTY.
|
||||||
|
state.io.sleep(.fromSeconds(1), .real) catch {};
|
||||||
|
session_pid = -1;
|
||||||
|
}
|
||||||
|
|
||||||
try state.log_file.reinit(state.io);
|
try state.log_file.reinit(state.io);
|
||||||
}
|
}
|
||||||
@@ -1658,7 +1671,20 @@ fn authenticate(ptr: *anyopaque) !bool {
|
|||||||
try state.buffer.reclaim();
|
try state.buffer.reclaim();
|
||||||
|
|
||||||
const auth_err = shared_err.readError();
|
const auth_err = shared_err.readError();
|
||||||
if (auth_err) |err| {
|
if (auth_err) |err| handle_error: {
|
||||||
|
if (err == error.PamNewAuthTokenRequired) {
|
||||||
|
try state.info_line.addMessage(
|
||||||
|
state.lang.token_expired,
|
||||||
|
state.config.bg,
|
||||||
|
state.config.fg,
|
||||||
|
);
|
||||||
|
|
||||||
|
state.maybe_old_password = try state.allocator.dupe(u8, state.password.text.items);
|
||||||
|
state.password.clear();
|
||||||
|
state.is_autologin = false;
|
||||||
|
break :handle_error;
|
||||||
|
}
|
||||||
|
|
||||||
state.auth_fails += 1;
|
state.auth_fails += 1;
|
||||||
state.buffer.setActiveWidget(state.password_widget);
|
state.buffer.setActiveWidget(state.password_widget);
|
||||||
|
|
||||||
@@ -1926,7 +1952,7 @@ fn updateBigClock(self: *BigLabel, ptr: *anyopaque) !void {
|
|||||||
const time = try interop.getTimeOfDay();
|
const time = try interop.getTimeOfDay();
|
||||||
const animate_time = @divTrunc(time.microseconds, 500_000);
|
const animate_time = @divTrunc(time.microseconds, 500_000);
|
||||||
const separator = if (state.animate and animate_time != 0) " " else ":";
|
const separator = if (state.animate and animate_time != 0) " " else ":";
|
||||||
const format = try std.fmt.bufPrintSentinel(
|
const format = try std.fmt.bufPrintZ(
|
||||||
&state.bigclock_format_buf,
|
&state.bigclock_format_buf,
|
||||||
"{s}{s}{s}{s}{s}{s}",
|
"{s}{s}{s}{s}{s}{s}",
|
||||||
.{
|
.{
|
||||||
@@ -1937,7 +1963,6 @@ fn updateBigClock(self: *BigLabel, ptr: *anyopaque) !void {
|
|||||||
if (state.config.bigclock_seconds) "%S" else "",
|
if (state.config.bigclock_seconds) "%S" else "",
|
||||||
if (state.config.bigclock_12hr) "%P" else "",
|
if (state.config.bigclock_12hr) "%P" else "",
|
||||||
},
|
},
|
||||||
0,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const clock_str = interop.timeAsString(state.io, &state.bigclock_buf, format);
|
const clock_str = interop.timeAsString(state.io, &state.bigclock_buf, format);
|
||||||
@@ -2612,12 +2637,12 @@ fn getAuthErrorMsg(err: anyerror, lang: Lang) []const u8 {
|
|||||||
error.PamCredentialsInsufficient => lang.err_pam_cred_insufficient,
|
error.PamCredentialsInsufficient => lang.err_pam_cred_insufficient,
|
||||||
error.PamCredentialsUnavailable => lang.err_pam_cred_unavail,
|
error.PamCredentialsUnavailable => lang.err_pam_cred_unavail,
|
||||||
error.PamMaximumTries => lang.err_pam_maxtries,
|
error.PamMaximumTries => lang.err_pam_maxtries,
|
||||||
error.PamNewAuthTokenRequired => lang.err_pam_authok_reqd,
|
|
||||||
error.PamPermissionDenied => lang.err_pam_perm_denied,
|
error.PamPermissionDenied => lang.err_pam_perm_denied,
|
||||||
error.PamSessionError => lang.err_pam_session,
|
error.PamSessionError => lang.err_pam_session,
|
||||||
error.PamSystemError => lang.err_pam_sys,
|
error.PamSystemError => lang.err_pam_sys,
|
||||||
error.PamUserUnknown => lang.err_pam_user_unknown,
|
error.PamUserUnknown => lang.err_pam_user_unknown,
|
||||||
error.PamAbort => lang.err_pam_abort,
|
error.PamAbort => lang.err_pam_abort,
|
||||||
|
error.AccountLocked => lang.err_acc_locked,
|
||||||
else => @errorName(err),
|
else => @errorName(err),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user