.ig Copyright (C) 1993,1994 by the author(s). This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be preserved on all copies. Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) $Header: atuser.3[7.0] Fri Jun 25 16:39:50 1993 andy@cs.tu-berlin.de frozen $ .. .TH atuser 3 "Fri Jun 25 16:39:50 1993" "AtFStk-1.12" "AtFS Toolkit Library" .SH NAME atUserValid, atScanUser, atUserName, atUserUid \- user handling .SH SYNOPSIS #include .br #include .sp void atScanUser (char *userName; Af_user *resultUser); .sp char* atUserName (Af_user *user); .sp Uid_t atUserUid (Af_user *user); .sp int atUserValid (Af_user *user); .sp .SH DESCRIPTION \fIatScanUser\fP scans the given string \fIuserName\fP and tries to derive an AtFS user identification (\fIresultUser\fP) from it. It does \fInot\fP verify the existence of a corresponding UNIX (/etc/passwd) user entry. Use atUserUid to test that. atScanUser understands the following formats: .TP 3c \fIuser\fP When the string does not contain an at sign, it is considered to be a plain user name from the current host and domain. .TP \fIuser@host\fP In the case that the part after the at sign doe not contain a period, it is assumed to be a hostname. Domain is the current domain. .TP \fIuser@host.domain\fP This format can only be recognized, when the given domain is equal to the current domain, and the hostname remains as \fIrest\fP between the at sign and domain name. .TP \fIuser@domain\fP An user identification string with a domain name different to the local domain is treated as user@domain, although this might be wrong. .LP \fIatUserName\fP returns a string of the form \fIuser@domain\fP generated from the given \fIuser\fP structure. If no domain name is given in the structure, it returns \fIuser@host\fP instead. With no host and no domain name, just \fIuser\fP is returned. The result string resides in static memory and will be overwritten on subsequent calls. .LP \fIatUserUid\fP tries to map the given \fIuser\fP structure to a UNIX user identification. It returns the uid on success, -1 otherwise. .LP \fIatUserValid\fP checks the given \fIuser\fP structure for plausibility. It returns FALSE on fauilure, a non null value on success.