Commit 15082c80 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

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

	access_perm and is_supervisor.
(send_async_sub_recipient): Likewise.
(recp_sent_by): Likewise.
(filter_secret_info): Likewise.
(person_text_read_access): Likewise.
(delete_text): Likewise.
(send_async_add_recipient): Likewise.
(add_recipient): Likewise.
(sub_recipient): Likewise.
(sub_comment): Likewise.
(sub_footnote): Likewise.
(get_map): Likewise.
(local_to_global): Likewise.
parent ce58ad97
/*
* $Id: text.c,v 0.74 1999/07/01 21:23:38 ceder Exp $
* $Id: text.c,v 0.75 1999/07/05 06:58:20 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -34,7 +34,7 @@
#endif
static const char *
rcsid = "$Id: text.c,v 0.74 1999/07/01 21:23:38 ceder Exp $";
rcsid = "$Id: text.c,v 0.75 1999/07/05 06:58:20 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -311,7 +311,7 @@ submit_to(Conf_no conf_no, /* The conference the user is trying to */
for ( i=0; i < param.max_super_conf_loop; i++)
{
acc = access_perm(conf_no, conf_c, active_connection, unlimited);
acc = access_perm(conf_no, active_connection, unlimited);
if ( acc <= none )
{
......@@ -629,7 +629,7 @@ send_async_sub_recipient (Text_no text_no, Text_stat *text_s,
*/
if (cptr->person != NULL
&& is_member_in_recpt(cptr->person, text_s, TRUE) == TRUE
&& access_perm(conf_no, NULL, cptr, read_protected) > none)
&& access_perm(conf_no, cptr, read_protected) > none)
{
async_sub_recipient(cptr, text_no, conf_no, type);
}
......@@ -1165,7 +1165,7 @@ recp_sent_by(Misc_info *misc, Misc_info *end,
{
case sent_by:
/* Found the sent-by. Check it out. */
return (is_supervisor(misc->datum.sender, NULL,
return (is_supervisor(misc->datum.sender,
viewer, viewer_p));
case loc_no:
......@@ -1236,7 +1236,7 @@ filter_secret_info(Text_stat *result,
switch( orig->type )
{
case recpt:
if ((access_perm(orig->datum.recipient, NULL, viewer_conn,
if ((access_perm(orig->datum.recipient, viewer_conn,
read_protected) <= none)
&& !ENA_C(viewer_conn, admin, 4))
{
......@@ -1250,7 +1250,7 @@ filter_secret_info(Text_stat *result,
break;
case cc_recpt:
if ((access_perm(orig->datum.cc_recipient, NULL, viewer_conn,
if ((access_perm(orig->datum.cc_recipient, viewer_conn,
read_protected) <= none)
&& !ENA_C(viewer_conn, admin, 4))
{
......@@ -1273,7 +1273,7 @@ filter_secret_info(Text_stat *result,
*/
if (viewer_p != NULL &&
(access_perm(orig->datum.bcc_recipient, NULL, viewer_conn,
(access_perm(orig->datum.bcc_recipient, viewer_conn,
limited) >= limited ||
locate_membership(orig->datum.bcc_recipient, viewer_p) ||
ENA_C(viewer_conn, admin, 4) ||
......@@ -1282,7 +1282,6 @@ filter_secret_info(Text_stat *result,
viewer,
viewer_p) ||
is_supervisor(original->author,
NULL,
viewer,
viewer_p)
))
......@@ -1570,7 +1569,7 @@ person_text_read_access(Text_no text_no,
(active_connection &&
pers_no == ACTPERS &&
ENA(wheel, 8)) ||
is_supervisor(misc->datum.recipient, recipient,
is_supervisor(misc->datum.recipient,
pers_no, pers_stat) == TRUE)
{
return TRUE;
......@@ -1585,7 +1584,7 @@ person_text_read_access(Text_no text_no,
(active_connection &&
pers_no == ACTPERS &&
ENA(wheel, 8)) ||
is_supervisor(misc->datum.cc_recipient, recipient,
is_supervisor(misc->datum.cc_recipient,
pers_no, pers_stat) == TRUE)
{
return TRUE;
......@@ -1600,7 +1599,7 @@ person_text_read_access(Text_no text_no,
(active_connection &&
pers_no == ACTPERS &&
ENA(wheel, 8)) ||
is_supervisor(misc->datum.bcc_recipient, recipient,
is_supervisor(misc->datum.bcc_recipient,
pers_no, pers_stat) == TRUE )
{
return TRUE;
......@@ -2682,7 +2681,7 @@ delete_text( Text_no text_no )
CHK_LOGIN(FAILURE);
GET_T_STAT(text_s, text_no, FAILURE);
if ( !is_supervisor(text_s->author, NULL, ACTPERS, ACT_P) &&
if ( !is_supervisor(text_s->author, ACTPERS, ACT_P) &&
!ENA(wheel, 8) && /* OK -- In an RPC call */
!ENA(admin, 5) ) /* OK -- In an RPC call */
{
......@@ -2865,7 +2864,7 @@ send_async_add_recipient (Text_no text_no, Text_stat *text_s,
cptr = get_conn_by_number(i);
if (cptr->person != NULL
&& is_member_in_recpt(cptr->person, text_s, TRUE) == TRUE
&& access_perm(conf_no, NULL, cptr, read_protected) > none)
&& access_perm(conf_no, cptr, read_protected) > none)
{
async_new_recipient(cptr, text_no, conf_no, type);
}
......@@ -2890,8 +2889,7 @@ add_recipient( Text_no text_no,
/* Get the conference */
GET_C_STAT(conf_c, conf_no, FAILURE);
if (access_perm(conf_no, conf_c, active_connection,
read_protected) <= none)
if (access_perm(conf_no, active_connection, read_protected) <= none)
{
err_stat = conf_no;
kom_errno = KOM_UNDEF_CONF;
......@@ -2926,7 +2924,7 @@ add_recipient( Text_no text_no,
return FAILURE;
}
if (!is_supervisor(conf_no, conf_c, ACTPERS, ACT_P) &&
if (!is_supervisor(conf_no, ACTPERS, ACT_P) &&
!ENA(wheel, 8)) /* OK -- In an RPC call */
{
err_stat = conf_no;
......@@ -3069,7 +3067,7 @@ sub_recipient( Text_no text_no,
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;
......@@ -3086,8 +3084,8 @@ sub_recipient( Text_no text_no,
}
if ( !is_supervisor (text_s->author, NULL, ACTPERS, ACT_P) &&
!is_supervisor (conf_no, conf_c, ACTPERS, ACT_P) &&
if ( !is_supervisor (text_s->author, ACTPERS, ACT_P) &&
!is_supervisor (conf_no, ACTPERS, ACT_P) &&
!ENA(wheel, 8) && /* OK -- In an RPC call */
!is_sender (text_s, conf_no) )
{
......@@ -3194,7 +3192,7 @@ sub_comment( Text_no comment, /* 'comment' is no longer a comment */
}
if ( !is_supervisor (text_s->author, NULL, ACTPERS, ACT_P) &&
if ( !is_supervisor (text_s->author, ACTPERS, ACT_P) &&
!ENA(wheel, 8) && /* OK -- In an RPC call */
!is_comm_sender (text_s, parent) )
{
......@@ -3299,7 +3297,7 @@ sub_footnote( Text_no footnote, /* 'footnote' is no longer a */
return FAILURE;
}
if (!is_supervisor (text_s->author, NULL, ACTPERS, ACT_P) &&
if (!is_supervisor (text_s->author, ACTPERS, ACT_P) &&
!ENA(wheel,8)) /* OK -- In an RPC call */
{
err_stat = footnote;
......@@ -3336,7 +3334,7 @@ get_map(Conf_no conf_no,
CHK_LOGIN(FAILURE);
GET_C_STAT(conf_c, conf_no, FAILURE);
acc = access_perm(conf_no, conf_c, active_connection, limited);
acc = access_perm(conf_no, active_connection, limited);
if (acc <= none)
{
......@@ -3410,7 +3408,7 @@ local_to_global(Conf_no conf_no,
CHK_LOGIN(FAILURE);
GET_C_STAT(conf_c, conf_no, FAILURE);
acc = access_perm(conf_no, conf_c, active_connection, limited);
acc = access_perm(conf_no, active_connection, limited);
if (acc <= none)
{
......
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