This file is indexed.

/usr/share/doc/ruby-shadow/README.euc is in ruby-shadow 2.4.1-1+b3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Shadow Password module

Copyright (C) 1998-1999 Takaaki Tateishi <ttate@jaist.ac.jp>
Modified at: <1999/8/19 06:48:01 by ttate>
License: See LICENSE


1. ³µÍ×

linux¤Ë¤ª¤¤¤Æshadow password¥Õ¥¡¥¤¥ë¤ò°·¤¦¤¿¤á
¤Î¥â¥¸¥å¡¼¥ë¡£


2. ¥¤¥ó¥¹¥È¡¼¥ë

ruby extconf.rb
make
make install

* Ãí°Õ
  shadow-1.3¤Ç¤Ïruby-1.3¤â¤·¤¯¤Ï¤½¤ì°Ê¹ß¤Î¥Ð¡¼¥¸¥ç¥ó
  ¤¬É¬ÍפǤ¹¡£

3. Shadow::Passwd¥â¥¸¥å¡¼¥ë¤Î¥á¥½¥Ã¥Éã

getspent
getspnam(name)
setspent
endspent
fgetspent(file)
sgetspent(str)
putspent(entry,file)
lckpwdf,lock
ulckpwdf,unlock
lock?

4. Structure

Shadow::Passwd::Entry (Struct::PasswdEntry)
       sp_namp - pointer to null-terminated user name.
       sp_pwdp - pointer to null-terminated password.
       sp_lstchg  -  days  since  Jan  1,  1970 password was last
                     changed.
       sp_min - days before which password may not be changed.
       sp_max - days after which password must be changed.
       sp_warn - days before password is to expire that  user  is
       warned of pending password expiration.
       sp_inact  -  days  after  password expires that account is
                    considered inactive and disabled.
       sp_expire - days since Jan 1, 1970 when  account  will  be


5. ÀâÌÀ

getspent, getspname, fgetspent, sgetspent¤ÏShadow::Passwd::Entry
¥¹¥È¥é¥¯¥Á¥ã¤òÊÖ¤·¤Þ¤¹¡£getspent ¤Ï¥Õ¥¡¥¤¥ë¤«¤é¼¡¤Î¥Ñ¥¹¥ï
¡¼¥É¥¨¥ó¥È¥ê¤òÊÖ¤·¡¢fgetspent ¤ÏÍ¿¤¨¤é¤ì¤¿IO¤«¤é¼¡¤Î¥¨¥ó¥È
¥ê¤òÊÖ¤·¤Þ¤¹¡£sgetspent¤ÏÍ¿¤¨¤é¤ì¤¿Ê¸»úÎ󤫤éShadow::Passwd::Entry
¥¹¥È¥é¥¯¥Á¥ã¤òÊÖ¤·¤Þ¤¹¡£getspnam¤Ï¥æ¡¼¥¶Ì¾¤òÍ¿¤¨¤ë¤È/etc/shadow
¤«¤é¤½¤Î¥æ¡¼¥¶¤ÎShadow::Passwd::Entry¥¹¥È¥é¥¯¥Á¥ã¤òÊÖ¤·¤Þ¤¹¡£
¥Õ¥¡¥¤¥ë¤Î½ªÃ¼¤Ë㤹¤ë¤Ènil¤ÎÃͤòÊÖ¤·¤Þ¤¹¡£

setspent,endspent¤Ï¤½¤ì¤¾¤ì¡¢¥Õ¥¡¥¤¥ë¤Ø¤Î¥¢¥¯¥»¥¹¤Î¤Ï¤¸¤á¤È
¤ª¤ï¤ê¤Ë»È¤¤¤Þ¤¹¡£

lckpwdf(lock),ulckpwdf(unlock)¤Ï/etc/shadow¤Ø¤ÎÇÓ¾Ū¥¢¥¯¥»¥¹
¤ò¼Â¸½¤¹¤ë¤¿¤á¤Ë¤¢¤ê¤Þ¤¹¡£
lock¤Ë¼ºÇÔ¤¹¤ë¤ÈShadow::FileLock¤È¤¤¤¦Îã³°¤òȯÀ¸¤µ¤»¤Þ¤¹¡£
lock¤ò¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ»È¤¦¤³¤È¤Ë¤è¤Ã¤Æ¡¢¥¤¥Æ¥ì¡¼¥¿¥Ö¥í¥Ã¥¯¤òÈ´¤±¤ë
¤È¤­¤Ë¼«Æ°Åª¤Ëunlock¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£


6. »²¹Í

* man shadow
* /usr/include/shadow.h



					ttate@jaist.ac.jp