diff options
| author | Dante Catalfamo <43040593+dantecatalfamo@users.noreply.github.com> | 2021-12-22 00:59:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-22 00:59:53 -0500 |
| commit | 3bd0575cfe685d52be79e1757c883c5f7e26ac0d (patch) | |
| tree | ca426e31484300a7554eeb303a794bae8dedf764 /lib/std | |
| parent | 6fdf7ce0af1c3ca210c3f49de4f833afee282076 (diff) | |
| download | zig-3bd0575cfe685d52be79e1757c883c5f7e26ac0d.tar.gz zig-3bd0575cfe685d52be79e1757c883c5f7e26ac0d.zip | |
Add BSD Authentication constants (#10376)
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/c/openbsd.zig | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index 4a41545e3f..d2a36fc5df 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -703,8 +703,48 @@ pub const T = struct { pub const IOCXMTFRAME = 0x80087444; }; +// BSD Authentication +pub const auth_item_t = c_int; + +pub const AUTHV = struct { + pub const ALL: auth_item_t = 0; + pub const CHALLENGE: auth_item_t = 1; + pub const CLASS: auth_item_t = 2; + pub const NAME: auth_item_t = 3; + pub const SERVICE: auth_item_t = 4; + pub const STYLE: auth_item_t = 5; + pub const INTERACTIVE: auth_item_t = 6; +}; + +pub const BI = struct { + pub const AUTH = "authorize"; // Accepted authentication + pub const REJECT = "reject"; // Rejected authentication + pub const CHALLENGE = "reject challenge"; // Reject with a challenge + pub const SILENT = "reject silent"; // Reject silently + pub const REMOVE = "remove"; // remove file on error + pub const ROOTOKAY = "authorize root"; // root authenticated + pub const SECURE = "authorize secure"; // okay on non-secure line + pub const SETENV = "setenv"; // set environment variable + pub const UNSETENV = "unsetenv"; // unset environment variable + pub const VALUE = "value"; // set local variable + pub const EXPIRED = "reject expired"; // account expired + pub const PWEXPIRED = "reject pwexpired"; // password expired + pub const FDPASS = "fd"; // child is passing an fd +}; + +pub const AUTH = struct { + pub const OKAY: c_int = 0x01; // user authenticated + pub const ROOTOKAY: c_int = 0x02; // authenticated as root + pub const SECURE: c_int = 0x04; // secure login + pub const SILENT: c_int = 0x08; // silent rejection + pub const CHALLENGE: c_int = 0x10; // a challenge was given + pub const EXPIRED: c_int = 0x20; // account expired + pub const PWEXPIRED: c_int = 0x40; // password expired + pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE); +}; + // Term -const V = struct { +pub const V = struct { pub const EOF = 0; // ICANON pub const EOL = 1; // ICANON pub const EOL2 = 2; // ICANON |
