This file is indexed.

/usr/share/doc/HOWTO/ja-html/Printing-HOWTO-7.html is in doc-linux-ja-html 2006.05.25-1.1.

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
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>The Linux Printing HOWTO: ¤É¤¦¤ä¤Ã¤ÆÀßÄꤹ¤ë¤Î¤«¡¢´ðËÜ</TITLE>
 <LINK HREF="Printing-HOWTO-8.html" REL=next>
 <LINK HREF="Printing-HOWTO-6.html" REL=previous>
 <LINK HREF="Printing-HOWTO.html#toc7" REL=contents>
</HEAD>
<BODY>
<A HREF="Printing-HOWTO-8.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Printing-HOWTO-6.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Printing-HOWTO.html#toc7">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s7">7. ¤É¤¦¤ä¤Ã¤ÆÀßÄꤹ¤ë¤Î¤«¡¢´ðËÜ</A></H2>

<H2><A NAME="ss7.1">7.1 ÅÁÅýŪ¤Ê lpd ¤ÎÀßÄêÊýË¡</A>
</H2>

<P>lpd ¤ËÂФ¹¤ëºÇ¾®¸Â¤ÎÀßÄê¤Ï¡¢¥­¥å¡¼¤Ë¥Õ¥¡¥¤¥ë¤ò¼è¤ê¹þ¤ß¡¢¤½¤ì¤ò
°õºþ¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È¤Ç¤¹¡£¥×¥ê¥ó¥¿¤¬¤½¤Î¤³¤È¤òÍý²ò¤¹¤ë¤«
¤É¤¦¤«¤ËÃí°Õ¤òʧ¤¦É¬ÍפϤ¢¤ê¤Þ¤»¤ó¡£¤¿¤À¡¢Ì¥ÎÏŪ¤Ê½ÐÎϤϤª¤½¤é¤¯
ÆÀ¤é¤ì¤Ê¤¤¤Ç¤·¤ç¤¦¡£¤½¤ì¤Ç¤â¡¢Íý²ò¤¹¤ë°Ù¤ÎÂè1Ãʳ¬¤Ç¤¹¡£Æɤß³¤±¤Æ
¤¯¤À¤µ¤¤!
<P>´ðËÜŪ¤Ë¡¢lpd ¤Ë°õºþ¥­¥å¡¼¤òÄɲ乤ë¤Ë¤Ï¡¢<EM>/etc/printcap</EM>
¤ÎÃæ¤Ë¥¨¥ó¥È¥ê¤òÄɲä·¡¢<EM>/var/spool/lpd</EM> ¤Î²¼¤Ë¿·¤·¤¤
¥¹¥×¡¼¥ëÍѤΥǥ£¥ì¥¯¥È¥ê¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
<P><EM>/etc/printcap</EM> ¤Î¥¨¥ó¥È¥ê¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
<BLOCKQUOTE><CODE>
<PRE>
# LOCAL djet500
lp|dj|deskjet:\
        :sd=/var/spool/lpd/dj:\
        :mx#0:\
        :lp=/dev/lp0:\
        :sh:
</PRE>
</CODE></BLOCKQUOTE>

¤³¤ÎÀßÄê¤Ç¤Ï¡¢<EM>lp</EM> ¤ä <EM>dj</EM> ¤Þ¤¿¤Ï <EM>deskjet</EM> ¤È¸Æ¤Ð¤ì¤ë¥¹¥×¡¼¥ë
¤òÄêµÁ¤·¡¢<EM>/var/spool/lpd/dj</EM> ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¹¥×¡¼¥ë¤·¤Þ¤¹¡£
¤½¤·¤Æ¥¸¥ç¥ÖËè¤ÎºÇÂ祵¥¤¥º¤òÀ©¸Â¤»¤º¡¢<EM>/dev/lp0</EM> ¤Ë»ØÄꤵ¤ì¤¿
¥Ç¥Ð¥¤¥¹¤«¤é°õºþ¤·¤Þ¤¹¡£Â縫½Ð¤·¥Ú¡¼¥¸ (°õºþ¤¹¤ë¿Í¤Î̾Á°Åù¤ò´Þ¤ó¤Ç¤¤¤ë
¤â¤Î) ¤ò°õºþ¥¸¥ç¥Ö¤ÎÀèƬ¤Ë²Ã¤¨¤ë¤³¤È¤Ï¤·¤Þ¤»¤ó¡£
<P>¤µ¤¡¡¢<EM>
<A HREF="http://www.picante.com/~gtaylor/pht/man/printcap.5.html">printcap</A></EM> ¤Î man ¥Ú¡¼¥¸¤òÆɤó¤Ç¤ß¤Æ¤¯¤À¤µ¤¤¡£
<P>
<P>¾åµ­¤ÎÀßÄê¤Ï¼Â¤Ëñ½ã¤Ç¤¹¤¬¡¢¼ÂºÝ¤ÏÍî¤È¤··ê¤¬¤¢¤ê¤Þ¤¹¡£Deskjet 500
¤¬Íý²ò¤Ç¤­¤ë¥Õ¥¡¥¤¥ë¤òÁ÷¤Ã¤Æ¤¤¤ë¤Ë¤â¤«¤«¤ï¤é¤º¡¢Deskjet ¤Ï´ñ̯¤Ê
°õºþ¤ò¹Ô¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£Î㤨¤Ð¡¢Ä̾ï¤Î Unix ¤Î¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò
Á÷¤Ã¤Æ¤â¡¢Deskjet ¤Ïʸ»ú¤É¤ª¤ê¤Ë newline ¤òËÝÌõ¤·¤Æ¤·¤Þ¤¦¤Î¤Ç¤¹¡£
¤Ä¤Þ¤ê¡¢¤³¤ó¤Ê¶ñ¹ç¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
This is line one.
                 This is line two.
                                  This is line three.
</PRE>
</CODE></BLOCKQUOTE>

¤É¤¦¤·¤¿¤â¤Î¤Ç¤·¤ç¤¦¡£¤³¤ÎÀßÄê¤Ç PostScript ¤Î¥Õ¥¡¥¤¥ë¤ò°õºþ¤·¤¿¤Ê¤é¡¢
¤³¤Î "³¬Ãʸú²Ì" ¤ò¤È¤â¤Ê¤¦¡¢Èþ¤·¤¤¤±¤ì¤É¤â¤Ê¤ó¤ÎÌò¤Ë¤âΩ¤¿¤Ê¤¤
PostScript ¥³¥Þ¥ó¥É¤ÎÎóµ­¤µ¤ì¤¿½ÐÎϤ¬ÆÀ¤é¤ì¤ë¤³¤È¤Ç¤·¤ç¤¦¡£
<P>
<P>ÌÀ¤é¤«¤Ë²¿¤«¤¬É¬ÍפǤ¹¡£¤½¤·¤Æ¤³¤ì¤¬¥Õ¥£¥ë¥¿¤ò»È¤¦ÌÜŪ¤Ê¤Î¤Ç¤¹¡£
printcap ¤Î man ¥Ú¡¼¥¸¤òÆɤó¤À´Ñ»¡ÎϤαԤ¤¤¢¤Ê¤¿¤Ê¤é¡¢¥¹¥×¡¼¥ë¤Î
°À­¤Ç¤¢¤ë <EM>if</EM> ¤È <EM>of</EM> ¤Ëµ¤¤¬¤Ä¤¤¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
<EM>if</EM> ¤Ä¤Þ¤êÆþÎÏ¥Õ¥£¥ë¥¿¤¬¡¢¤Þ¤µ¤Ë¤³¤³¤ÇɬÍפʤâ¤Î¤Ê¤Î¤Ç¤¹¡£
<P>
<P>newline ¤ÎÁ°¤Ë¥­¥ã¥ê¥Ã¥¸¥ê¥¿¡¼¥ó¤òÉÕ¤±²Ã¤¨¤ë <EM>filter</EM> ¤È
¸Æ¤Ð¤ì¤ë¾®¤µ¤Ê¥·¥§¥ë¡¦¥¹¥¯¥ê¥×¥È¤ò½ñ¤±¤Ð¡¢¤³¤Î³¬Ãʾõ¤Î°õºþ¤Ï½üµî
¤µ¤ì¤Þ¤¹¡£¤â¤Á¤í¤ó¡¢printcap ¤Î¥¨¥ó¥È¥ê¤Ë <EM>if</EM> ¤Î¹Ô¤ò
Äɲ乤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
lp|dj|deskjet:\
        :sd=/var/spool/lpd/dj:\
        :mx#0:\
        :lp=/dev/lp0:\
        :if=/var/spool/lpd/dj/filter:\
        :sh:
</PRE>
</CODE></BLOCKQUOTE>
<P>´Êñ¤Ê filter ¥¹¥¯¥ê¥×¥È¤Ï¤³¤Î¤è¤¦¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£
<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
#!perl
# The above line should really have the whole path to perl
# (¾åµ­¤Î¹Ô¤Ï perl ¤Ø¤Î´°Á´¤Ê¥Ñ¥¹¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó)
# This script must be executable: chmod 755 filter
# (¤³¤Î¥¹¥¯¥ê¥×¥È¤Ï¼Â¹Ô²Äǽ¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£
#   chmod 755 filter ¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤)
while(&lt;STDIN>){chop $_; print "$_\r\n";};
# You might also want to end with a form feed: print "\f";
# (°õºþ¤ÎºÇ¸å¤Ë²þÊǤ¬É¬Íפʤ顢print "\f"; ¤òÆþ¤ì¤Æ¤¯¤À¤µ¤¤)
</PRE>
</CODE></BLOCKQUOTE>
<P>¾åµ­¤Î¤è¤¦¤Ê¤³¤È¤¬½ª¤ï¤ì¤ÐÄ̾ï¤Î Unix ¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò
°õºþ¤Ç¤­¤ë¤è¤¦¤Ê¥¹¥×¡¼¥ë¤Ë¤Ê¤ê¡¢°ÕÌ£¤Î¤¢¤ë·ë²Ì¤¬ÆÀ¤é¤ì¤Þ¤¹
(¤³¤Î¥Õ¥£¥ë¥¿¤ò½ñ¤¯Èó¾ï¤Ë¿¤¯¤Î¤è¤ê¤è¤¤ÊýË¡¤¬¤¢¤ê¤Þ¤¹¤¬¡¢
¼ÂÎã¤È¤Ê¤ë¤â¤Î¤Ï¤Û¤È¤ó¤É¤¢¤ê¤Þ¤»¤ó¡£¤¢¤Ê¤¿¤Ï¤è¤êÍ­¸ú¤Ê¤â¤Î¤ò
ºî¤Ã¤Æ¤¯¤À¤µ¤¤)¡£
<P>
<P>»Ä¤Ã¤Æ¤¤¤ëÌäÂê¤Ï¡¢Ã±¤Ê¤ë¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤ò°õºþ¤¹¤ë¤³¤È¤Ç¤Ï¤Ê¤¯¡¢
PostScript ¤ä¤½¤Î¾¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¡¢¤Þ¤¿¤Ï¥°¥é¥Õ¥£¥¯¥¹¤ò´Þ¤à½ÐÎÏ
¤ò²Äǽ¤Ë¤¹¤ë¤³¤È¤Ç¤¹¡£¤½¤·¤Æ¤½¤ì¼«ÂΤϲÄǽ¤Ç¤¹¤·¡¢´Êñ¤Ê¤³¤È¤Ç¤¹¡£
ÊýË¡¤ÏÁ°½Ò¤·¤¿²þ¹Ô½¤Àµ¤ò¹Ô¤¦¥Õ¥£¥ë¥¿¤Îñ½ã¤Ê³ÈÄ¥¤Ç¤¹¡£ÆþÎÏ
¤È¤·¤ÆÍÍ¡¹¤Ê·Á¼°¤Î¥Õ¥¡¥¤¥ë¤ò¼õ¤±Æþ¤ì¡¢¤½¤ì¤¾¤ì¤Ë Deskjet ¤Î¤è¤¦¤Ë
¤­¤ì¤¤¤Ê½ÐÎϤòÆÀ¤é¤ì¤ë¥Õ¥£¥ë¥¿¤ò½ñ¤¯¤³¤È¤¬¤Ç¤­¤¿¤Î¤Ê¤é¡¢ËÜÅö¤Ë
¸­¤¤°õºþ¥¹¥×¡¼¥ë¤Ë¤Ê¤Ã¤¿¤È¤¤¤¨¤Þ¤¹¡£
<P>
<P>¤½¤Î¤è¤¦¤Ê¥Õ¥£¥ë¥¿¤Ï¡¢¥Þ¥¸¥Ã¥¯¥Õ¥£¥ë¥¿(<EM>magic</EM> filter) ¤È¸Æ¤Ð¤ì¤Æ
¤¤¤Þ¤¹¡£´ñ̯¤Ê¤â¤Î¤ò°õºþ¤¹¤ë¤Ä¤â¤ê¤Ç¤Ê¤±¤ì¤Ð¡¢Æ¬¤òǺ¤Þ¤»¤Æ¼«Ê¬¤Ç¥Õ¥£¥ë¥¿
¤ò½ñ¤¯É¬ÍפϤ¢¤ê¤Þ¤»¤ó¡£¥Í¥Ã¥È¾å¤Ë¤Ï¡¢´û¤Ë¿¤¯¤ÎÁÇÀ²¤é¤·¤¤¥¹¥×¡¼¥ë¤¬
¸ºß¤·¤Æ¤¤¤ë¤Î¤Ç¤¹¡£ APS ¥Õ¥£¥ë¥¿¤ÏºÇÎɤÎÁªÂò»è¤Î°ì¤Ä¤Ç¤¹¡£¤â¤·¤¯¤Ï
¤¢¤Ê¤¿¤Î Linux ¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ë¡¢¤³¤ì¤ò´Êñ¤ËÀßÄê¤Ç¤­¤ë¥Ä¡¼¥ë¤¬
ÍÑ°Õ¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
<P>
<H2><A NAME="ss7.2">7.2 ¥Õ¥¡¥¤¥ë¤Îµö²ÄÀ©¸Â</A>
</H2>

<P>¹­¤¯¼ûÍפ¬¤¢¤ë¤¿¤á¡¢»ä¤Ï¥·¥¹¥Æ¥à¾å¤Î½ÅÍפʥե¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢°Ê²¼¤Î
¥ê¥¹¥È¤Ë¤¢¤ë¤è¤¦¤Êµö²ÄÀ©¸Â¤òÍ¿¤¨¤Æ¤¤¤Þ¤¹¡£²¿¼ïÎà¤â¤Î¤è¤êÎɤ¤ÊýË¡¤¬
¤¢¤ê¤Þ¤¹¤¬¡¢ÍýÁÛŪ¤Ë¤Ï SGID ¤µ¤ì¤¿¥Ð¥¤¥Ê¥ê¤À¤±¤ò»ÈÍѤ¹¤Ù¤­¤Ç¡¢SUID root 
¤ò²¿¤Ë¤Ç¤âŬÍѤ¹¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤·¤«¤·¡¢»ä¤Î¥·¥¹¥Æ¥à¤Ï¤³¤Î¤è¤¦¤Ë
ÀßÄꤵ¤ì¤Æ¤¤¤Æ¡¢ÌäÂê¤Ê¤¯Æ°ºî¤·¤Æ¤¤¤Þ¤¹(Ψľ¤Ë¸À¤¦¤Ê¤é¡¢¥Ù¥ó¥À¤Ç
¤µ¤¨¤­¤Á¤ó¤ÈÆ°ºî¤¹¤ë lpd ¤ò½Ð²Ù¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹¤«¤é¡¢¤½¤ì¤Ï¹ÓÇϤò
¾è¤ê¤³¤Ê¤½¤¦¤È¤¹¤ë¤è¤¦¤Ê¤â¤Î¤Ç¤·¤ç¤¦)¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
-r-sr-sr-x   1 root     lp    /usr/bin/lpr*
-r-sr-sr-x   1 root     lp    /usr/bin/lprm*
-rwxr--r--   1 root     root  /usr/sbin/lpd*
-r-xr-sr-x   1 root     lp    /usr/sbin/lpc*
drwxrwxr-x   4 root     lp    /var/spool/lpd/
drwxr-xr-x   2 root     lp    /var/spool/lpd/lp/
</PRE>
</CODE></BLOCKQUOTE>
<P>¾®¤µ¤¤ÈÖ¹æ (low-numbered) ¤Î lp ¥µ¡¼¥Ó¥¹¥Ý¡¼¥È¤ËÀܳ¤µ¤ì¤ë¤¿¤á¡¢
¸½ºß¤Î¤È¤³¤í lpd ¤Ï root ¤È¤·¤Æ¼Â¹Ô¤µ¤ì¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥Ð¥¤¥ó¥É
¤µ¤ì¤¿¸å¤Ï¡¢¤ª¤½¤é¤¯ UID lp.lp ¤Þ¤¿¤Ï²¿¤«¤Ë¤Ê¤ë¤Ù¤­¤Ç¤Ç¤·¤ç¤¦¡£
¤·¤«¤·¡¢»ä¤Ï¤½¤ì¤¬²¿¤ò¤¹¤ë¤Î¤«¤Ï¹Í¤¨¤Þ¤»¤ó¡£¤¢¤·¤«¤é¤º¡£
<P>
<HR>
<A HREF="Printing-HOWTO-8.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Printing-HOWTO-6.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Printing-HOWTO.html#toc7">Ìܼ¡¤Ø</A>
</BODY>
</HTML>