#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
#include "uss_ptserver.h" /*Module interface */
#include <afs/ptclient.h> /*Protection Server client interface */
#include <afs/pterror.h> /*Protection Server error codes */
+#include <afs/ptuser.h>
#include <afs/com_err.h> /*Error code xlation */
*------------------------------------------------------------------------*/
static afs_int32
-InitThisModule()
+InitThisModule(void)
{ /*InitThisModule */
+#ifdef USS_PTSERVER_DB
static char rn[] = "uss_ptserver:InitThisModule"; /*Routine name */
+#endif
register afs_int32 code; /*Return code */
/*
uss_ConfDir, /*Config directory */
uss_Cell); /*Cell to touch */
if (code) {
- com_err(uss_whoami, code,
+ afs_com_err(uss_whoami, code,
"while initializing Protection Server library");
return (code);
}
*------------------------------------------------------------------------*/
afs_int32
-uss_ptserver_AddUser(a_user, a_uid)
- char *a_user;
- char *a_uid;
-
+uss_ptserver_AddUser(char *a_user, char *a_uid)
{ /*uss_ptserver_AddUser */
afs_int32 code; /*Various return codes */
* ID known for the user name.
*/
mappedUserID = id;
- if (code = pr_SNameToId(a_user, &mappedUserID)) {
- com_err(uss_whoami, code,
+ if ((code = pr_SNameToId(a_user, &mappedUserID))) {
+ afs_com_err(uss_whoami, code,
"while getting uid from Protection Server");
return (code);
}
/*
* Got a fatal error.
*/
- com_err(uss_whoami, code, "while accessing Protection Server");
+ afs_com_err(uss_whoami, code, "while accessing Protection Server");
return (code);
}
}
*------------------------------------------------------------------------*/
afs_int32
-uss_ptserver_DelUser(a_name)
- char *a_name;
-
+uss_ptserver_DelUser(char *a_name)
{ /*uss_ptserver_DelUser */
afs_int32 code; /*Various return codes */
uss_whoami, a_name);
} /*User not registered */
else {
- com_err(uss_whoami, code,
+ afs_com_err(uss_whoami, code,
"while deleting user from Protection DB");
return (code);
} /*Fatal PTS error */
*------------------------------------------------------------------------*/
afs_int32
-uss_ptserver_XlateUser(a_user, a_uidP)
- char *a_user;
- afs_int32 *a_uidP;
-
+uss_ptserver_XlateUser(char *a_user, afs_int32 *a_uidP)
{ /*uss_ptserver_XlateUser */
-
+#ifdef USS_PTSERVER_DB
static char rn[] = "uss_ptserver_XlateUser"; /*Routine name */
+#endif
register afs_int32 code; /*Various return codes */
if (uss_verbose)
*a_uidP = 0;
code = pr_SNameToId(a_user, a_uidP);
if (code) {
- com_err(uss_whoami, code, "while getting uid from Protection DB");
+ afs_com_err(uss_whoami, code, "while getting uid from Protection DB");
return (code);
}
if (*a_uidP == ANONYMOUSID) {