/etc/hosts permission checking

This commit is contained in:
Muaz Ahmad 2024-05-10 13:13:59 +05:00
parent 94a4d1de24
commit 54560fc91a

View file

@ -1,9 +1,14 @@
const std = @import("std");
pub const IPs = struct { pub const IPs = struct {
v4: [:0]const u8, v4: [:0]const u8,
v6: [:0]const u8, v6: [:0]const u8,
}; };
pub fn check_perms() !void {} pub fn check_perms() !void {
var f = try std.fs.openFileAbsolute("/etc/hosts", .{ .mode = .write_only });
f.close();
}
pub fn get_input() ![:0]const u8 { pub fn get_input() ![:0]const u8 {
return "stub"; return "stub";