View Issue Details

IDProjectCategoryView StatusLast Update
0002164unrealircdpublic2015-07-19 20:01
ReporterXuefer Assigned Tosyzop  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionno change required 
Platformwin2kOSwindows 
Product Version3.2.2 
Summary0002164: do_mode(chptr, &me..) crash ircd
Descriptionwhat i'm trying to do is: server MODE #channel +o user
without the patch, i have to do:
(void)do_mode(chptr, sptr, sptr, 2, parv, 0, 0);
which shows: user MODE #channel +o user, quite strange
===my code========
    char *parv[] = {
        "+o",
        sptr->name,
        NULL
    };
    (void)do_mode(chptr, &me, &me, 2, parv, 0, 0);

backtrace:
#0 is_half_op
#1 do_mode_char
#2 set_mode
#3 do_mode


suggested fix:
in function do_mode_char
- if (is_half_op(cptr, chptr) && !is_chan_op(cptr, chptr) && !IsULine(cptr)
+ if (IsPerson(cptr) && is_half_op(cptr, chptr) && !is_chan_op(cptr, chptr) && !IsULine(cptr)

don't know if this will break something, but it works fine for me, including "halfop do +b on remote"

TagsNo tags attached.
3rd party modules

Relationships

child of 0003111 closed 3.2.7 Release 

Activities

Xuefer

2004-11-12 01:26

reporter   ~0008279

i guess it's better to modify is_chan_op is_** has_** etc

from:
if (IsServer(cptr))
   return 1;
to:
if (IsServer(cptr) || IsMe(cptr))
   return 1;

or change #define IsServer(xx) to (xx->xx==xx||IsMe(xx))
maybe performance drop?
but it's really nice for module author to use m_**(&me, &me ..)
doing stufs and then sendto_serv_butone_token(**) is hard to maintain(also ugly) for me

WolfSage

2007-04-26 22:05

reporter   ~0013750

Sts, these 2 patches look good to you? The former makes sense at least. Verify it's a person first..

stskeeps

2007-04-27 02:32

reporter   ~0013755

I would really like to see a backtrace though ..

Issue History

Date Modified Username Field Change
2004-11-08 23:01 Xuefer New Issue
2004-11-12 01:26 Xuefer Note Added: 0008279
2006-11-12 14:36 syzop Status new => acknowledged
2006-11-12 14:37 syzop Relationship added child of 0003111
2007-04-26 22:05 WolfSage Note Added: 0013750
2007-04-27 02:32 stskeeps Note Added: 0013755
2015-07-19 20:01 syzop Status acknowledged => closed
2015-07-19 20:01 syzop Assigned To => syzop
2015-07-19 20:01 syzop Resolution open => no change required