LPRng Reference Manual: 24 Sep 2004 (For LPRng-3.8.28) | ||
---|---|---|
Prev | Chapter 17. Permissions and Authentication | Next |
[not] key assigned value [not] key=pattern substring match [not] key=pattern1,pattern2,pattern3,... glob and exact [not] key=IP1/mask1,IP2/mask2,... IP address
Each of the indicated values is matched against a list of patterns. The following types of matches are used:
assigned value. The keyword has an assigned value which is true (match) or false (no match). Examples are SAMEHOST and SERVER.
substring match. The indicated entry is present as a substring in the pattern.
GLOB matches. The pattern is interpreted as a GLOB style pattern, where * matches 0 or more characters, and ? matches a single character, and [L-H] specifies a range of characters from L to H, in ASCII order.
IP address match. The address must be specified in the standard nn.nn.nn.nn format. The mask must be either an integer number corresponding to the number of significant bits, or in the standard nn.nn.nn.nn format. Addresses are compared by doing
If the result is 0, then a match results. Note that there may be one or more addresses being checked for; this can occur when a host may have multiple IP addresses assigned to it.
integer range match. The pattern has the form low-high, where low and high are integer numbers. The match succeeds if the value is in the specified range.
Same IP Address Match. This compares two lists of IP addresses; a match is found when there is one or more common addresses.
The DEFAULT rule specifies the default if no rule matches. Normally, there is one DEFAULT entry in a permissions file.
Match type: substring
The SERVICE key is based on the type of request.
Key | Request |
---|---|
Key | Request |
C | LPC Control Request |
M | lprm Removal Request |
P | Printing |
Q | lpq Status Request |
R | lpr Job Transfer |
X | Connection Request |
Each of the above codes corresponds either directly to the user command, or a set of subcommands.
If you have an LPC request, you can add an LPC=xxx clause to refine the permissions checking to allow or disallow lpc commands such as lpc status, printcap, active, .
Match type: GLOB
The USER information is taken from the P (person or logname) information in the print job control file.
Match type: GLOB
The REMOTEUSER information is taken from the user information sent with a service request.
Note that one of the flaws of RFC1179 is that an lpq (print status) request does not provide a REMOTEUSER name.
Match type: GLOB
The H (host) information in the print job control file is used to do a DNS lookup, and the resulting list of names and addresses is used for matching purposes.
Match type: GLOB
The REMOTEHOST information is obtained by doing a reverse IP name lookup on the remote host IP address and the resulting list of names and addresses is used for matching purposes. If there is no FQDN available, then the IP address in text form will be used.
Match type: integer range
The REMOTEPORT value is the originating port of the TCP/IP connection. The match succeeds if it is in the specified range.
Alias for REMOTEPORT.
Alias for HOST.
Alias for REMOTEHOST.
Match type: GLOB
The requested lpc command. This allows the following permissions line to be used:
Match type: exact string match
Both the REMOTEUSER and USER information must be present and identical.
Match type: Same IP Address
The REMOTEHOST and HOST address lists are checked; if there is a common value the match succeeds.
Match type: Matching IP Address
One of the REMOTEHOST addresses must be the same as one of
the addresses of the lpd server
host, or must be one of the addresses found by looking up the
localhost name using gethostbyname()
.
Match type: Address Match
The list of REMOTEHOST and HOST addresses must not have a common entry. This is usually the case when a remote lpd server is forwarding jobs to the lpd server.
Match type: modified GLOB
The USER must be present in one of the groups in /etc/group or whatever permissions mechanism is used to determine group ownership which matches the GLOB pattern. If the pattern has the form @name, then a check to see if the user is in the named netgroup is done.
The same rules as for GROUP, but using the REMOTEUSER value.
Match type: GLOB
A CONTROLLINE pattern has the form
X is a single upper case letter. The corresponding line must be present in a control file, and the pattern is applied to the line contents.
This pattern can be used to select only files with specific control file information for printing.
Match type: value
If the current transfer or the transfer used to send a job was authenticated, then AUTH is true or matches.
Match type: glob
If the current transfer or the transfer used to send a job was authenticated, then AUTHTYPE is set to the name of the authentication method.
Match type: GLOB
The AUTHUSER rule will check to see if the authenticated user identification matches the pattern.
Match type: IPmatch, but for IPV6 as well as IPV4
There is a subtle problem with names and IP addresses which are obtained for 'multi-homed hosts', i.e. - those with multiple ethernet interfaces, and for IPV6 (IP Version 6), in which a host can have multiple addresses, and for the normal host which can have both a short name and a fully qualified domain name.
The IFIP (interface IP) field can be used to check the IP address of the interface that accepted the network connection, as reported by the information returned by the accept() system call. Note that this information may be IPV4 or IPV6 information, depending on the origination of the system. This information is used by gethostbyaddr() to obtain the originating host fully qualified domain name (FQDN) and set of IP addresses. Note that this FQDN will be for the originating interface, and may not be the canonical host name. Some systems which use the Domain Name Server (DNS) system may add the canonical system name as an alias.
This entry is deprecated and may not be supported in future releases.