X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/2c58f61c7faca7723da35ffd7924af764108e9fd..6d167bb1539ec7eeffd77bef20b73fee3761af63:/auth_getuserinfo.html?ds=sidebyside diff --git a/auth_getuserinfo.html b/auth_getuserinfo.html index 324cb68..3505ea2 100644 --- a/auth_getuserinfo.html +++ b/auth_getuserinfo.html @@ -1,15 +1,15 @@ -
auth_getuserinfo â Obtain account information
-#include <courierauth.h>
-
int rc=auth_getuserinfo( | const char *Â | userid, |
 | int  | (*callback_func)( struct authinfo *, void *) , |
 | void * | callback_arg) ; |
+-->
auth_getuserinfo â Obtain account information
+#include <courierauth.h>
+
int rc=auth_getuserinfo( | const char *userid, |
 | int (*callback_func)( struct authinfo *, void *) , |
 | void *callback_arg) ; |
If userid
is a valid account name,
retrieve the account particulars and invoke
-callback_func
.
callback_func
will be invoked if
userid
exists,
and callback_func
's return value becomes
@@ -25,7 +25,7 @@ return value indicates that this request was processed, but it failed
The second argument to callback_func
will be
callback_arg
, which is not interpreted by this
function in any way.
-The first argument will be a pointer to the following structure:
Example 1. struct authinfo
+The first argument will be a pointer to the following structure:Example 1. struct authinfo
struct authinfo { const char *sysusername; const uid_t *sysuserid; @@ -42,8 +42,8 @@ struct authinfo { const char *options; } ; --Description of the above fields:
- address
+
+Description of the above fields:
- address
The authenticated login ID.
- sysusername
The authenticated account's userid and groupid can be looked up in the password file using
address
. @@ -67,70 +67,75 @@ if no quota is set).- passwd
The account's encrypted password, if available. If the account has a cleartext password defined, this field can be set to
NULL
. -The encrypted password can take several formats:
+The encrypted password can take several formats:
A traditional triple-DES crypted password, or a MD5+salt-hashed password, -as used in Linux.
-â{MD5}â followed by a base64-encoded MD5 hash -of the password.
-â{SHA}â followed by a base64-encoded SHA1 hash +as used in Linux.
+â{MD5}â followed by a base64-encoded MD5 hash +of the password.
+â{SHA}â followed by a base64-encoded SHA1 hash of the password.
- clearpasswd
The account's cleartext password, if available. If the account has an encrypted password defined, this field can be set to
NULL
.- options
A comma-separated list of miscellaneous account options. -See below for more information.
Account options
Depending on the configuration of the Courier authentication library, accounts may have individual options associated with them. If the authentication library configuration does not implement account -options, the option string will be
NULL
. +options, the option string will be aNULL
value. Otherwise it will be a comma-separated list of -âoption
=value
â +âoption
=value
â settings.Note
-This is the account option implementation -that's used by Courier, Courier-IMAP, and +The application is responsible for actually implementing the +options. +For example, +sn authentication request for service âimapâ, for example, +will succeed provided that the userid and the password are valid, +even if âdisableimap=1â is set. +The application's
callback_func
should check for this +condition, and return a negative return code.Note
+The following list of account options is a combined list of implemented +options supported by Courier, Courier-IMAP, and SqWebMail packages. Some of the following information is obviously not applicable for a particular package. The inapplicable bits should be obvious.
The following options are recognized by the various Courier -packages:
Note
-The application is responsible for enforcing all the âdisabledâ -option. -An authentication request for service âimapâ, for example, -will succeed provided that the userid and the password are valid, -even if âdisableimap=1â is set. -The application's
callback_func
should check for this -condition, and return a negative return code.
disableimap=
n
+packages:
disableimap=
n
If "n" is 1, IMAP access to this account should be disabled.
disablepop3=
n
-If "n" is 1, POP3 access to this account should be disabled.
disablewebmail=
n
+If "n" is 1, POP3 access to this account should be disabled.
disableinsecureimap=
n
+If "n" is 1, unencrypted IMAP access to this account should be disabled.
disableinsecurepop3=
n
+If "n" is 1, unencrypted POP3 access to this account should be disabled.
disablewebmail=
n
If "n" is 1, webmail access to this account should be disabled.
disableshared=
n
If "n" is 1, this account should not have access to shared folders or be able to share its own folders with other people.
group=
name
-This account is a member of access group +This option is used by Courier-IMAP in calculating access control lists. +This option places the account as a member of access group
name
. Instead of granting access rights on individual mail folders to individual accounts, the access rights can be granted to an access group -ânameâ, and all members of this group get the specified access +ânameâ, and all members of this group get the specified access rights.-The access group name âadministratorsâ is a reserved group. +The access group name âadministratorsâ is a reserved group. All accounts in the
administrators
group automatically receive all rights to all accessible folders.Note
This option may be specified multiple times to specify that the account belongs to multiple account groups.
sharedgroup=
name
+Another option used by Courier-IMAP. Append "name" to the name of the top level virtual shared folder index file. This setting restricts which virtual shared folders this account could possibly access (and that's on top of whatever else the access control lists say). See the virtual shared folder documentation for more information.
For technical reasons, group names may not include comma, tab, "/" or "|" -characters.
+authlib(3), -auth_generic(3), +auth_generic(3), -auth_login(3), +auth_login(3), -auth_enumerate(3), +auth_enumerate(3), -auth_passwd(3), +auth_passwd(3), -auth_getoption(3).