summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-31 11:22:31 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-31 11:22:31 +0800
commit73452a673c51c9e363789abbfc3d0dec85581142 (patch)
tree9fad5a1a4f5bfe6264848836ecb55b210d7402cd
parent44265c09a84cabfab57392d23a6f28bd70cf5cb4 (diff)
downloadpttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.gz
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.bz2
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.lz
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.xz
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.zst
pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.zip
permission check when writing from article list
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@262 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c4
-rw-r--r--mbbsd/talk.c28
2 files changed, 17 insertions, 15 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index d2d616b2..3393baaf 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1,4 +1,4 @@
-/* $Id: bbs.c,v 1.43 2002/05/31 03:11:17 in2 Exp $ */
+/* $Id: bbs.c,v 1.44 2002/05/31 03:22:31 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -683,7 +683,7 @@ int invalid_brdname(char *brd) {
static int b_call_in(int ent, fileheader_t *fhdr, char *direct)
{
userinfo_t *u=search_ulist (searchuser(fhdr->owner));
- if(u && !u->invisible && call_in(u,friend_stat(currutmp, u)) )
+ if(u && call_in(u,friend_stat(currutmp, u)) )
return FULLUPDATE;
return DONOTHING;
}
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index e0cbefea..113f4c16 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.50 2002/05/30 17:37:06 ptt Exp $ */
+/* $Id: talk.c,v 1.51 2002/05/31 03:22:31 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -1752,18 +1752,20 @@ static void draw_pickup(int drawall, pickup_t *pickup, int pickup_way,
int call_in(userinfo_t *uentp, int fri_stat)
{
- char genbuf[60];
- if( HAS_PERM(PERM_LOGINOK) &&
- uentp->pid != currpid &&
- strcmp(uentp->userid, cuser.userid) != 0 &&
- (HAS_PERM(PERM_SYSOP) ||
- (uentp->pager != 3 &&
- (fri_stat & HFM || uentp->pager != 4))) ){
- sprintf(genbuf, "Call-In %s ĄG", uentp->userid);
- my_write(uentp->pid, genbuf, uentp->userid, 0, NULL);
- return 1;
- }
- return 0;
+ char genbuf[60];
+ if( HAS_PERM(PERM_LOGINOK) &&
+ uentp->pid != currpid &&
+ strcmp(uentp->userid, cuser.userid) != 0 &&
+ (HAS_PERM(PERM_SYSOP) ||
+ (!uentp->invisible &&
+ !(fri_stat & HRM) &&
+ uentp->pager != 3 &&
+ (fri_stat & HFM || uentp->pager != 4))) ){
+ sprintf(genbuf, "Call-In %s ĄG", uentp->userid);
+ my_write(uentp->pid, genbuf, uentp->userid, 0, NULL);
+ return 1;
+ }
+ return 0;
}
static void userlist(void)
{