11
|
1 use std::marker::PhantomData;
|
|
2 use constants::{PamItemType, PAM_SERVICE, PAM_USER, PAM_USER_PROMPT, PAM_TTY, PAM_RUSER, PAM_RHOST,
|
|
3 PAM_AUTHTOK, PAM_OLDAUTHTOK};
|
|
4 use module::PamItem;
|
|
5 pub use conv::PamConv;
|
|
6
|
|
7
|
|
8 pub struct PamService {}
|
|
9
|
|
10 impl PamItem for PamService {
|
|
11 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
12 PAM_SERVICE
|
|
13 }
|
|
14 }
|
|
15
|
|
16 pub struct PamUser {}
|
|
17
|
|
18 impl PamItem for PamUser {
|
|
19 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
20 PAM_USER
|
|
21 }
|
|
22 }
|
|
23
|
|
24 pub struct PamUserPrompt {}
|
|
25
|
|
26 impl PamItem for PamUserPrompt {
|
|
27 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
28 PAM_USER_PROMPT
|
|
29 }
|
|
30 }
|
|
31
|
|
32 pub struct PamTty {}
|
|
33
|
|
34 impl PamItem for PamTty {
|
|
35 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
36 PAM_TTY
|
|
37 }
|
|
38 }
|
|
39
|
|
40 pub struct PamRUser {}
|
|
41
|
|
42 impl PamItem for PamRUser {
|
|
43 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
44 PAM_RUSER
|
|
45 }
|
|
46 }
|
|
47
|
|
48 pub struct PamRHost {}
|
|
49
|
|
50 impl PamItem for PamRHost {
|
|
51 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
52 PAM_RHOST
|
|
53 }
|
|
54 }
|
|
55
|
|
56 pub struct PamAuthTok {}
|
|
57
|
|
58 impl PamItem for PamAuthTok {
|
|
59 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
60 PAM_AUTHTOK
|
|
61 }
|
|
62 }
|
|
63
|
|
64 pub struct PamOldAuthTok {}
|
|
65
|
|
66 impl PamItem for PamOldAuthTok {
|
|
67 fn item_type(_: PhantomData<Self>) -> PamItemType {
|
|
68 PAM_OLDAUTHTOK
|
|
69 }
|
|
70 }
|