Commit 8f5323e9 authored by Per Cederqvist's avatar Per Cederqvist

(get_person_stat): Removed the victim_c argument from all calls to

	access_perm.  Eliminate one call to GET_C_STAT.
(get_person_stat_old): Likewise.
(get_created_texts): Removed the victim_c argument from all calls
	to access_perm.
(map_created_texts): Likewise.
(do_query_read_texts): Likewise.
(set_user_area): Likewise.
(set_pers_flags): Likewise.
(set_passwd): Removed the victim_c argument from all calls to is_supervisor.
parent f7f8fd70
/*
* $Id: person.c,v 0.57 1999/07/01 21:23:37 ceder Exp $
* $Id: person.c,v 0.58 1999/07/05 07:00:13 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
#endif
static const char *
rcsid = "$Id: person.c,v 0.57 1999/07/01 21:23:37 ceder Exp $";
rcsid = "$Id: person.c,v 0.58 1999/07/05 07:00:13 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -738,14 +738,12 @@ get_person_stat (Pers_no person,
Person * result)
{
Person *p_orig;
Conference *pers_c;
Access acc;
CHK_CONNECTION(FAILURE);
GET_P_STAT(p_orig, person, FAILURE);
GET_C_STAT(pers_c, person, FAILURE);
acc = access_perm(person, pers_c, active_connection, unlimited);
acc = access_perm(person, active_connection, unlimited);
if ( acc == error )
return FAILURE;
......@@ -775,16 +773,14 @@ get_person_stat_old (Pers_no person,
Person * result)
{
Person *p_orig;
Conference *pers_c;
Access acc;
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
GET_P_STAT(p_orig, person, FAILURE);
GET_C_STAT(pers_c, person, FAILURE);
acc = access_perm(person, pers_c, active_connection, unlimited);
acc = access_perm(person, active_connection, unlimited);
if ( acc == error )
return FAILURE;
......@@ -827,7 +823,7 @@ get_created_texts(Pers_no pers_no,
GET_P_STAT(pers_p, pers_no, FAILURE);
acc = access_perm(pers_no, NULL, active_connection, read_protected);
acc = access_perm(pers_no, active_connection, read_protected);
if (acc == error)
return FAILURE;
......@@ -888,7 +884,7 @@ map_created_texts(Pers_no pers_no,
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
acc = access_perm(pers_no, NULL, active_connection, read_protected);
acc = access_perm(pers_no, active_connection, read_protected);
if (acc == error)
return FAILURE;
......@@ -966,7 +962,7 @@ set_passwd (Pers_no person,
if ( person != ACTPERS &&
!ENA(wheel, 7) && /* OK -- In an RPC call */
!ENA(wheel, 8) && /* OK -- In an RPC call */
!is_supervisor (person, NULL, ACTPERS, ACT_P) )
!is_supervisor (person, ACTPERS, ACT_P) )
{
err_stat = person;
kom_errno = KOM_PERM;
......@@ -1017,7 +1013,7 @@ do_query_read_texts(Pers_no victim,
CHK_CONNECTION(FAILURE);
GET_P_STAT( victim_p, victim, FAILURE);
victim_acc = access_perm(victim, NULL, active_connection, unlimited);
victim_acc = access_perm(victim, active_connection, unlimited);
if ( victim_acc <= none )
{
err_stat = victim;
......@@ -1025,7 +1021,7 @@ do_query_read_texts(Pers_no victim,
return FAILURE;
}
if (access_perm(conf_no, NULL, active_connection, read_protected) <= none)
if (access_perm(conf_no, active_connection, read_protected) <= none)
{
err_stat = conf_no;
kom_errno = KOM_UNDEF_CONF;
......@@ -1042,7 +1038,7 @@ do_query_read_texts(Pers_no victim,
}
if (membp->type.secret &&
!is_supervisor(victim, NULL, ACTPERS, ACT_P) &&
!is_supervisor(victim, ACTPERS, ACT_P) &&
!ENA(admin, 4)) /* OK -- Guarded */
{
err_stat = conf_no;
......@@ -1108,7 +1104,7 @@ set_user_area(Pers_no pers_no,
CHK_LOGIN(FAILURE);
GET_P_STAT(pers_p, pers_no, FAILURE);
acc = access_perm(pers_no, NULL, active_connection, unlimited);
acc = access_perm(pers_no, active_connection, unlimited);
if (acc <= none)
{
err_stat = pers_no;
......@@ -1142,7 +1138,7 @@ set_pers_flags(Pers_no pers_no,
GET_P_STAT(pers_p, pers_no, FAILURE);
acc = access_perm(pers_no, NULL, active_connection, unlimited);
acc = access_perm(pers_no, active_connection, unlimited);
if (acc <= none)
{
err_stat = pers_no;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment