| ... | ... | @@ -703,8 +703,48 @@ pub const T = struct { |
| 703 | 703 | pub const IOCXMTFRAME = 0x80087444; |
| 704 | 704 | }; |
| 705 | 705 | |
| 706 | // BSD Authentication |
| 707 | pub const auth_item_t = c_int; |
| 708 | |
| 709 | pub const AUTHV = struct { |
| 710 | pub const ALL: auth_item_t = 0; |
| 711 | pub const CHALLENGE: auth_item_t = 1; |
| 712 | pub const CLASS: auth_item_t = 2; |
| 713 | pub const NAME: auth_item_t = 3; |
| 714 | pub const SERVICE: auth_item_t = 4; |
| 715 | pub const STYLE: auth_item_t = 5; |
| 716 | pub const INTERACTIVE: auth_item_t = 6; |
| 717 | }; |
| 718 | |
| 719 | pub const BI = struct { |
| 720 | pub const AUTH = "authorize"; // Accepted authentication |
| 721 | pub const REJECT = "reject"; // Rejected authentication |
| 722 | pub const CHALLENGE = "reject challenge"; // Reject with a challenge |
| 723 | pub const SILENT = "reject silent"; // Reject silently |
| 724 | pub const REMOVE = "remove"; // remove file on error |
| 725 | pub const ROOTOKAY = "authorize root"; // root authenticated |
| 726 | pub const SECURE = "authorize secure"; // okay on non-secure line |
| 727 | pub const SETENV = "setenv"; // set environment variable |
| 728 | pub const UNSETENV = "unsetenv"; // unset environment variable |
| 729 | pub const VALUE = "value"; // set local variable |
| 730 | pub const EXPIRED = "reject expired"; // account expired |
| 731 | pub const PWEXPIRED = "reject pwexpired"; // password expired |
| 732 | pub const FDPASS = "fd"; // child is passing an fd |
| 733 | }; |
| 734 | |
| 735 | pub const AUTH = struct { |
| 736 | pub const OKAY: c_int = 0x01; // user authenticated |
| 737 | pub const ROOTOKAY: c_int = 0x02; // authenticated as root |
| 738 | pub const SECURE: c_int = 0x04; // secure login |
| 739 | pub const SILENT: c_int = 0x08; // silent rejection |
| 740 | pub const CHALLENGE: c_int = 0x10; // a challenge was given |
| 741 | pub const EXPIRED: c_int = 0x20; // account expired |
| 742 | pub const PWEXPIRED: c_int = 0x40; // password expired |
| 743 | pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE); |
| 744 | }; |
| 745 | |
| 706 | 746 | // Term |
| 707 | | const V = struct { |
| 747 | pub const V = struct { |
| 708 | 748 | pub const EOF = 0; // ICANON |
| 709 | 749 | pub const EOL = 1; // ICANON |
| 710 | 750 | pub const EOL2 = 2; // ICANON |