line |
true |
false |
branch |
69
|
2433753 |
0 |
IO * const io = GvIOn(gv); |
|
2433753 |
0 |
IO * const io = GvIOn(gv); |
|
2433753 |
0 |
IO * const io = GvIOn(gv); |
|
24251 |
2409502 |
IO * const io = GvIOn(gv); |
90
|
2433753 |
0 |
if (PL_op && PL_op->op_type == OP_OPEN) { |
|
2429787 |
3966 |
if (PL_op && PL_op->op_type == OP_OPEN) { |
100
|
3579 |
2430174 |
if (IoIFP(io)) { |
102
|
3578 |
1 |
if (IoTYPE(io) == IoTYPE_STD) { |
106
|
3574 |
4 |
else if (fd >= 0 && fd <= PL_maxsysfd) { |
|
2595 |
979 |
else if (fd >= 0 && fd <= PL_maxsysfd) { |
114
|
0 |
983 |
else if (IoTYPE(io) == IoTYPE_PIPE) |
116
|
546 |
437 |
else if (IoIFP(io) != IoOFP(io)) { |
117
|
0 |
546 |
if (IoOFP(io)) { |
126
|
1 |
3578 |
if (result == EOF && fd > PL_maxsysfd) { |
|
0 |
1 |
if (result == EOF && fd > PL_maxsysfd) { |
128
|
0 |
0 |
PerlIO_printf(Perl_error_log, |
|
0 |
0 |
PerlIO_printf(Perl_error_log, |
|
0 |
0 |
PerlIO_printf(Perl_error_log, |
|
0 |
0 |
PerlIO_printf(Perl_error_log, |
130
|
0 |
0 |
HEKfARG(GvENAME_HEK(gv)) |
136
|
3273 |
2430480 |
if (as_raw) { |
151
|
0 |
3273 |
if (num_svs != 0) { |
171
|
3235 |
38 |
if ((ismodifying = (rawmode & modifyingmode))) { |
172
|
3235 |
0 |
if ((ismodifying & O_WRONLY) == O_WRONLY || |
175
|
0 |
3235 |
TAINT_PROPER("sysopen"); |
203
|
29 |
2430480 |
while (isSPACE(*type)) |
205
|
2430473 |
23 |
while (tend > type && isSPACE(tend[-1])) |
|
16 |
2430457 |
while (tend > type && isSPACE(tend[-1])) |
208
|
1228187 |
1202293 |
if (num_svs) { |
219
|
1228187 |
0 |
if (!IS_SAFE_PATHNAME(*svp, "open")) |
222
|
9 |
0 |
name = (SvOK(*svp) || SvGMAGICAL(*svp)) ? |
|
9 |
0 |
name = (SvOK(*svp) || SvGMAGICAL(*svp)) ? |
|
1 |
8 |
name = (SvOK(*svp) || SvGMAGICAL(*svp)) ? |
223
|
9 |
1228178 |
savesvpv (*svp) : savepvs (""); |
231
|
507 |
2429973 |
if ((*type == IoTYPE_RDWR) && /* scary */ |
|
507 |
0 |
if ((*type == IoTYPE_RDWR) && /* scary */ |
232
|
43 |
464 |
(*(type+1) == IoTYPE_RDONLY || *(type+1) == IoTYPE_WRONLY) && |
233
|
43 |
0 |
((!num_svs || (tend > type+1 && tend[-1] != IoTYPE_PIPE)))) { |
|
43 |
0 |
((!num_svs || (tend > type+1 && tend[-1] != IoTYPE_PIPE)))) { |
234
|
2 |
505 |
TAINT_PROPER("open"); |
239
|
27 |
2430453 |
if (*type == IoTYPE_PIPE) { |
240
|
2 |
25 |
if (num_svs) { |
241
|
0 |
2 |
if (type[1] != IoTYPE_STD) { |
249
|
5 |
27 |
} while (isSPACE(*type)); |
250
|
25 |
2 |
if (!num_svs) { |
254
|
6 |
21 |
if (*name == '\0') { |
256
|
2 |
4 |
if (ckWARN(WARN_PIPE)) |
261
|
7 |
14 |
if (!(*name == '-' && name[1] == '\0') || num_svs) |
|
0 |
7 |
if (!(*name == '-' && name[1] == '\0') || num_svs) |
262
|
0 |
14 |
TAINT_ENV(); |
263
|
0 |
21 |
TAINT_PROPER("piped open"); |
264
|
19 |
2 |
if (!num_svs && name[len-1] == '|') { |
|
2 |
17 |
if (!num_svs && name[len-1] == '|') { |
266
|
1 |
1 |
if (ckWARN(WARN_PIPE)) |
271
|
0 |
21 |
if (out_raw) |
273
|
0 |
21 |
else if (out_crlf) |
275
|
0 |
21 |
if (num_svs > 1) { |
281
|
2 |
19 |
if (num_svs) { |
282
|
0 |
2 |
if (*type) { |
283
|
0 |
0 |
if (PerlIO_apply_layers(aTHX_ fp, mode, type) != 0) { |
289
|
194701 |
2235752 |
else if (*type == IoTYPE_WRONLY) { |
290
|
33 |
194668 |
TAINT_PROPER("open"); |
292
|
162359 |
32342 |
if (*type == IoTYPE_WRONLY) { |
302
|
0 |
194701 |
if (out_raw) |
304
|
0 |
194701 |
else if (out_crlf) |
306
|
188538 |
6163 |
if (*type == '&') { |
310
|
21 |
6424 |
if (*type == '=') { |
314
|
5135 |
1310 |
if (!num_svs && !*type && supplied_fp) { |
|
4956 |
179 |
if (!num_svs && !*type && supplied_fp) { |
320
|
6266 |
0 |
if (num_svs > 1) { |
324
|
0 |
6266 |
while (isSPACE(*type)) |
326
|
1310 |
4956 |
if (num_svs && ( |
|
1306 |
4 |
if (num_svs && ( |
328
|
1260 |
46 |
|| (SvPOKp(*svp) && looks_like_number(*svp)) |
|
3 |
1257 |
|| (SvPOKp(*svp) && looks_like_number(*svp)) |
330
|
0 |
7 |
fd = SvUV(*svp); |
333
|
643 |
5616 |
else if (isDIGIT(*type)) { |
338
|
1303 |
4313 |
if (num_svs) { |
344
|
4312 |
1 |
thatio = GvIO(thatgv); |
|
4312 |
0 |
thatio = GvIO(thatgv); |
|
4312 |
0 |
thatio = GvIO(thatgv); |
346
|
1 |
5611 |
if (!thatio) { |
352
|
5611 |
0 |
if ((that_fp = IoIFP(thatio))) { |
373
|
2780 |
2831 |
if (that_fp == PerlIO_stdout() |
374
|
1823 |
957 |
|| that_fp == PerlIO_stderr()) |
376
|
78 |
879 |
else if (that_fp == PerlIO_stdin()) |
380
|
0 |
879 |
else if (IoTYPE(thatio) == IoTYPE_SOCKET) |
386
|
4962 |
1299 |
if (!num_svs) |
388
|
5611 |
650 |
if (that_fp) { |
392
|
635 |
15 |
if (dodup) |
396
|
0 |
650 |
if (!(fp = PerlIO_openn(aTHX_ type,mode,fd,0,0,NULL,num_svs,svp))) { |
397
|
0 |
0 |
if (dodup && fd >= 0) |
404
|
4643 |
188538 |
while (isSPACE(*type)) |
406
|
3 |
188535 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
3 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
0 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
0 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
410
|
0 |
3 |
if (num_svs > 1) { |
416
|
174209 |
14326 |
if (!num_svs) { |
425
|
17 |
194961 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
13 |
4 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
4 |
9 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
1 |
3 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
428
|
1227017 |
1008735 |
else if (*type == IoTYPE_RDONLY) { |
431
|
9641 |
1227017 |
} while (isSPACE(*type)); |
433
|
0 |
1227017 |
if (in_raw) |
435
|
0 |
1227017 |
else if (in_crlf) |
437
|
282 |
1226735 |
if (*type == '&') { |
440
|
0 |
1226735 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
0 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
0 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
|
0 |
0 |
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) { |
444
|
0 |
0 |
if (num_svs > 1) { |
450
|
14668 |
1212067 |
if (!num_svs) { |
458
|
843858 |
382875 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
6 |
843852 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
1 |
5 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
|
0 |
1 |
if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) |
461
|
482 |
1008253 |
else if ((num_svs && /* '-|...' or '...|' */ |
|
479 |
3 |
else if ((num_svs && /* '-|...' or '...|' */ |
462
|
0 |
479 |
type[0] == IoTYPE_STD && type[1] == IoTYPE_PIPE) || |
|
1008253 |
3 |
type[0] == IoTYPE_STD && type[1] == IoTYPE_PIPE) || |
463
|
1008136 |
117 |
(!num_svs && tend > type+1 && tend[-1] == IoTYPE_PIPE)) { |
|
3327 |
1004809 |
(!num_svs && tend > type+1 && tend[-1] == IoTYPE_PIPE)) { |
464
|
479 |
3327 |
if (num_svs) { |
469
|
8039 |
0 |
while (tend > type && isSPACE(tend[-1])) |
|
4712 |
3327 |
while (tend > type && isSPACE(tend[-1])) |
471
|
0 |
3327 |
for (; isSPACE(*type); type++) |
476
|
0 |
3806 |
if (*name == '\0') { |
478
|
0 |
0 |
if (ckWARN(WARN_PIPE)) |
483
|
690 |
3116 |
if (!(*name == '-' && name[1] == '\0') || num_svs) |
|
0 |
690 |
if (!(*name == '-' && name[1] == '\0') || num_svs) |
484
|
0 |
3116 |
TAINT_ENV(); |
485
|
0 |
3806 |
TAINT_PROPER("piped open"); |
488
|
0 |
3806 |
if (in_raw) |
490
|
0 |
3806 |
else if (in_crlf) |
493
|
3 |
3803 |
if (num_svs > 1) { |
500
|
479 |
3327 |
if (num_svs) { |
501
|
0 |
479 |
while (isSPACE(*type)) |
503
|
0 |
479 |
if (*type) { |
504
|
0 |
0 |
if (PerlIO_apply_layers(aTHX_ fp, mode, type) != 0) { |
511
|
3 |
1004926 |
if (num_svs) |
515
|
0 |
1004926 |
for (; isSPACE(*name); name++) |
519
|
0 |
1004926 |
if (in_raw) |
521
|
0 |
1004926 |
else if (in_crlf) |
524
|
81 |
1004845 |
if (*name == '-' && name[1] == '\0') { |
|
81 |
0 |
if (*name == '-' && name[1] == '\0') { |
529
|
1004845 |
0 |
if (!num_svs) { |
539
|
844041 |
1589695 |
if (!fp) { |
540
|
843999 |
42 |
if (IoTYPE(io) == IoTYPE_RDONLY && ckWARN(WARN_NEWLINE) |
|
843874 |
125 |
if (IoTYPE(io) == IoTYPE_RDONLY && ckWARN(WARN_NEWLINE) |
541
|
3 |
843871 |
&& strchr(oname, '\n') |
548
|
801854 |
787841 |
if (ckWARN(WARN_IO)) { |
550
|
21 |
736259 |
(fp == PerlIO_stdout() || fp == PerlIO_stderr())) { |
551
|
21 |
6 |
Perl_warner(aTHX_ packWARN(WARN_IO), |
555
|
27 |
0 |
HEKfARG(GvENAME_HEK(gv))); |
557
|
21921 |
779906 |
else if ((IoTYPE(io) == IoTYPE_WRONLY) && fp == PerlIO_stdin()) { |
|
3 |
21918 |
else if ((IoTYPE(io) == IoTYPE_WRONLY) && fp == PerlIO_stdin()) { |
560
|
3 |
0 |
HEKfARG(GvENAME_HEK(gv)) |
570
|
1585873 |
3822 |
if (IoTYPE(io) && IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD && fd >= 0) { |
|
1583595 |
2278 |
if (IoTYPE(io) && IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD && fd >= 0) { |
571
|
2 |
1583593 |
if (PerlLIO_fstat(fd,&PL_statbuf) < 0) { |
577
|
2 |
1583591 |
if (S_ISSOCK(PL_statbuf.st_mode)) |
580
|
0 |
1583591 |
else if ( |
586
|
0 |
0 |
&& IoTYPE(io) != IoTYPE_WRONLY /* Dups of STD* filehandles already have */ |
587
|
0 |
0 |
&& IoTYPE(io) != IoTYPE_RDONLY /* type so they aren't marked as sockets */ |
591
|
0 |
0 |
if (PerlSock_getsockname(fd, (struct sockaddr *)tmpbuf, &buflen) >= 0 |
592
|
0 |
0 |
|| errno != ENOTSOCK) |
605
|
2594 |
1587099 |
if (saveifp) { /* must use old fp? */ |
609
|
2438 |
156 |
if (saveofp) { |
611
|
145 |
2293 |
if (saveofp != saveifp) { /* was a socket? */ |
615
|
2594 |
0 |
if (savefd != fd) { |
620
|
2 |
2592 |
if (PerlLIO_dup2(fd, savefd) < 0) { |
653
|
0 |
2592 |
if (was_fdopen) { |
677
|
1587499 |
2192 |
if (fd >= 0) { |
686
|
198114 |
1391577 |
if (writing) { |
687
|
198112 |
2 |
if (IoTYPE(io) == IoTYPE_SOCKET |
688
|
30094 |
168018 |
|| (IoTYPE(io) == IoTYPE_WRONLY && fd >= 0 && S_ISCHR(PL_statbuf.st_mode)) ) { |
|
154 |
29940 |
|| (IoTYPE(io) == IoTYPE_WRONLY && fd >= 0 && S_ISCHR(PL_statbuf.st_mode)) ) { |
690
|
1 |
155 |
if (*s == IoTYPE_IMPLICIT || *s == IoTYPE_NUMERIC) |
693
|
0 |
156 |
if (!(IoOFP(io) = PerlIO_openn(aTHX_ type,s,fd,0,0,NULL,0,svp))) { |
726
|
106 |
235 |
if (!PL_argvoutgv) |
728
|
341 |
0 |
if (io && (IoFLAGS(io) & IOf_ARGV) && (IoFLAGS(io) & IOf_START)) { |
|
44 |
297 |
if (io && (IoFLAGS(io) & IOf_ARGV) && (IoFLAGS(io) & IOf_START)) { |
730
|
12 |
32 |
if (PL_inplace) { |
736
|
0 |
341 |
if (PL_filemode & (S_ISUID|S_ISGID)) { |
737
|
0 |
0 |
PerlIO_flush(IoIFP(GvIOn(PL_argvoutgv))); /* chmod must follow last write */ |
|
0 |
0 |
PerlIO_flush(IoIFP(GvIOn(PL_argvoutgv))); /* chmod must follow last write */ |
|
0 |
0 |
PerlIO_flush(IoIFP(GvIOn(PL_argvoutgv))); /* chmod must follow last write */ |
|
0 |
0 |
PerlIO_flush(IoIFP(GvIOn(PL_argvoutgv))); /* chmod must follow last write */ |
739
|
0 |
0 |
if (PL_lastfd != -1) |
747
|
341 |
0 |
if (!GvAV(gv)) |
749
|
240 |
104 |
while (av_len(GvAV(gv)) >= 0) { |
753
|
0 |
240 |
SvTAINTED_off(GvSVn(gv)); /* previous tainting irrelevant */ |
|
0 |
0 |
SvTAINTED_off(GvSVn(gv)); /* previous tainting irrelevant */ |
754
|
203 |
37 |
sv_setsv(GvSVn(gv),sv); |
755
|
0 |
240 |
SvSETMAGIC(GvSV(gv)); |
756
|
240 |
0 |
PL_oldname = SvPVx(GvSV(gv), oldlen); |
757
|
240 |
0 |
if (do_open(gv,PL_oldname,oldlen,PL_inplace!=0,O_RDONLY,0,NULL)) { |
758
|
24 |
216 |
if (PL_inplace) { |
759
|
0 |
24 |
TAINT_PROPER("inplace open"); |
760
|
0 |
24 |
if (oldlen == 1 && *PL_oldname == '-') { |
|
0 |
0 |
if (oldlen == 1 && *PL_oldname == '-') { |
772
|
3 |
21 |
if (!S_ISREG(PL_filemode)) { |
779
|
18 |
3 |
if (*PL_inplace && strNE(PL_inplace, "*")) { |
|
3 |
15 |
if (*PL_inplace && strNE(PL_inplace, "*")) { |
|
15 |
3 |
if (*PL_inplace && strNE(PL_inplace, "*")) { |
781
|
3 |
12 |
if (star) { |
788
|
0 |
3 |
} while ((star = strchr(begin, '*'))); |
789
|
0 |
3 |
if (*begin) |
813
|
0 |
15 |
if (PerlLIO_rename(PL_oldname,SvPVX_const(sv)) < 0) { |
841
|
0 |
6 |
if (UNLINK(PL_oldname) < 0) { |
856
|
0 |
21 |
if (!Perl_do_openn(aTHX_ PL_argvoutgv, (char*)SvPVX_const(sv), |
877
|
21 |
0 |
if (fileuid != PL_statbuf.st_uid || filegid != PL_statbuf.st_gid) { |
|
0 |
21 |
if (fileuid != PL_statbuf.st_uid || filegid != PL_statbuf.st_gid) { |
890
|
0 |
0 |
if (ckWARN_d(WARN_INPLACE)) { |
892
|
0 |
0 |
if (PerlLIO_stat(PL_oldname, &PL_statbuf) >= 0 |
893
|
0 |
0 |
&& !S_ISREG(PL_statbuf.st_mode)) |
905
|
104 |
0 |
if (io && (IoFLAGS(io) & IOf_ARGV)) |
|
104 |
0 |
if (io && (IoFLAGS(io) & IOf_ARGV)) |
907
|
11 |
93 |
if (PL_inplace) { |
909
|
11 |
0 |
if (io && (IoFLAGS(io) & IOf_ARGV) |
|
11 |
0 |
if (io && (IoFLAGS(io) & IOf_ARGV) |
910
|
11 |
0 |
&& PL_argvout_stack && AvFILLp(PL_argvout_stack) >= 0) |
|
11 |
0 |
&& PL_argvout_stack && AvFILLp(PL_argvout_stack) >= 0) |
930
|
0 |
1219693 |
if (!gv) |
932
|
1219693 |
0 |
if (!gv || !isGV_with_GP(gv)) { |
|
1219685 |
8 |
if (!gv || !isGV_with_GP(gv)) { |
|
0 |
1219685 |
if (!gv || !isGV_with_GP(gv)) { |
933
|
8 |
0 |
if (not_implicit) |
937
|
1219685 |
0 |
io = GvIO(gv); |
|
1219685 |
0 |
io = GvIO(gv); |
|
1219685 |
0 |
io = GvIO(gv); |
938
|
6 |
1219679 |
if (!io) { /* never opened */ |
939
|
6 |
0 |
if (not_implicit) { |
946
|
1219330 |
347 |
if (not_implicit) { |
963
|
1590134 |
180 |
if (IoIFP(io)) { |
964
|
3796 |
1586338 |
if (IoTYPE(io) == IoTYPE_PIPE) { |
966
|
2913 |
883 |
if (not_implicit) { |
967
|
5 |
2908 |
STATUS_NATIVE_CHILD_SET(status); |
|
2870 |
38 |
STATUS_NATIVE_CHILD_SET(status); |
|
38 |
2870 |
STATUS_NATIVE_CHILD_SET(status); |
|
38 |
2870 |
STATUS_NATIVE_CHILD_SET(status); |
|
38 |
0 |
STATUS_NATIVE_CHILD_SET(status); |
974
|
1586265 |
73 |
else if (IoTYPE(io) == IoTYPE_STD) |
977
|
197998 |
1388267 |
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) { /* a socket */ |
|
134 |
197864 |
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) { /* a socket */ |
979
|
134 |
0 |
retval = (PerlIO_close(IoOFP(io)) != EOF && !prev_err); |
|
0 |
134 |
retval = (PerlIO_close(IoOFP(io)) != EOF && !prev_err); |
984
|
1586114 |
14 |
retval = (PerlIO_close(IoIFP(io)) != EOF && !prev_err); |
|
1 |
1586113 |
retval = (PerlIO_close(IoIFP(io)) != EOF && !prev_err); |
989
|
174 |
6 |
else if (not_implicit) { |
1000
|
17563 |
0 |
IO * const io = GvIO(gv); |
|
17562 |
1 |
IO * const io = GvIO(gv); |
|
17562 |
0 |
IO * const io = GvIO(gv); |
1004
|
17512 |
51 |
if (!io) |
1006
|
2 |
17510 |
else if (IoTYPE(io) == IoTYPE_WRONLY) |
1009
|
17502 |
15 |
while (IoIFP(io)) { |
1010
|
17502 |
0 |
if (PerlIO_has_cntptr(IoIFP(io))) { /* (the code works without this) */ |
1011
|
102 |
17400 |
if (PerlIO_get_cnt(IoIFP(io)) > 0) /* cheat a little, since */ |
1019
|
47 |
55 |
if (ch != EOF) { |
1027
|
55 |
0 |
if (PerlIO_has_cntptr(IoIFP(io)) && PerlIO_canset_cnt(IoIFP(io))) { |
|
55 |
0 |
if (PerlIO_has_cntptr(IoIFP(io)) && PerlIO_canset_cnt(IoIFP(io))) { |
1028
|
0 |
55 |
if (PerlIO_get_cnt(IoIFP(io)) < -1) |
1031
|
9 |
46 |
if (PL_op->op_flags & OPf_SPECIAL) { /* not necessarily a real EOF yet? */ |
1032
|
8 |
1 |
if (gv != PL_argvgv || !nextargv(gv)) /* get another fp handy */ |
|
5 |
3 |
if (gv != PL_argvgv || !nextargv(gv)) /* get another fp handy */ |
1045
|
5130 |
0 |
IO *const io = GvIO(gv); |
|
5128 |
2 |
IO *const io = GvIO(gv); |
|
5128 |
0 |
IO *const io = GvIO(gv); |
1050
|
5128 |
2 |
if (io && (fp = IoIFP(io))) { |
|
5121 |
7 |
if (io && (fp = IoIFP(io))) { |
1066
|
30415 |
0 |
IO *const io = GvIO(gv); |
|
30412 |
3 |
IO *const io = GvIO(gv); |
|
30412 |
0 |
IO *const io = GvIO(gv); |
1069
|
30412 |
3 |
if (io && (fp = IoIFP(io))) { |
|
30409 |
3 |
if (io && (fp = IoIFP(io))) { |
1085
|
112 |
0 |
IO *const io = GvIO(gv); |
|
109 |
3 |
IO *const io = GvIO(gv); |
|
109 |
0 |
IO *const io = GvIO(gv); |
1090
|
109 |
3 |
if (io && (fp = IoIFP(io))) |
|
107 |
2 |
if (io && (fp = IoIFP(io))) |
1101
|
5718 |
1551326 |
if (s) { |
1102
|
8818 |
5718 |
while (*s) { |
1103
|
7960 |
858 |
if (*s == ':') { |
1106
|
3068 |
0 |
if (s[2] == 'a' && s[3] == 'w' |
|
3068 |
0 |
if (s[2] == 'a' && s[3] == 'w' |
1107
|
40 |
3028 |
&& (!s[4] || s[4] == ':' || isSPACE(s[4]))) |
|
40 |
0 |
&& (!s[4] || s[4] == ':' || isSPACE(s[4]))) |
1116
|
949 |
0 |
if (s[2] == 'r' && s[3] == 'l' && s[4] == 'f' |
|
949 |
0 |
if (s[2] == 'r' && s[3] == 'l' && s[4] == 'f' |
|
949 |
0 |
if (s[2] == 'r' && s[3] == 'l' && s[4] == 'f' |
1117
|
0 |
949 |
&& (!s[5] || s[5] == ':' || isSPACE(s[5]))) |
|
0 |
0 |
&& (!s[5] || s[5] == ':' || isSPACE(s[5]))) |
1129
|
40 |
818 |
else if (isSPACE(*s)) { |
1137
|
4746 |
15 |
if (!end) |
1212
|
2752587 |
0 |
if (!sv) |
1214
|
53705 |
2698882 |
if (SvTYPE(sv) == SVt_IV && SvIOK(sv)) { |
1216
|
0 |
53705 |
if (SvIsUV(sv)) |
1225
|
2637244 |
61638 |
const char *tmps = SvPV_const(sv, len); |
1229
|
87469 |
2611411 |
if (PerlIO_isutf8(fp)) { /* If the stream is utf8 ... */ |
1230
|
74888 |
12581 |
if (!SvUTF8(sv)) { /* Convert to utf8 if necessary */ |
1235
|
10530 |
2051 |
else if (ckWARN4_d(WARN_UTF8, WARN_SURROGATE, WARN_NON_UNICODE, WARN_NONCHAR)) { |
1239
|
791 |
2610620 |
else if (DO_UTF8(sv)) { /* But if is utf8 internally, attempt to |
|
791 |
0 |
else if (DO_UTF8(sv)) { /* But if is utf8 internally, attempt to |
1244
|
775 |
16 |
if (!utf8) { |
1255
|
16 |
0 |
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8), |
1257
|
0 |
16 |
PL_op ? OP_DESC(PL_op) : "print" |
|
0 |
0 |
PL_op ? OP_DESC(PL_op) : "print" |
1270
|
2191801 |
507077 |
if (len && (PerlIO_write(fp,tmps,len) == 0)) |
|
21 |
2191779 |
if (len && (PerlIO_write(fp,tmps,len) == 0)) |
1273
|
2698856 |
21 |
return happy ? !PerlIO_error(fp) : FALSE; |
1285
|
53214 |
531521 |
if (PL_op->op_flags & OPf_REF) { |
1288
|
52285 |
2678 |
if (gv == PL_defgv) |
1290
|
2678 |
0 |
io = GvIO(gv); |
|
2678 |
0 |
io = GvIO(gv); |
|
2678 |
0 |
io = GvIO(gv); |
1293
|
27 |
2678 |
PL_statgv = gv ? gv : (GV *)io; |
1295
|
2703 |
2 |
if(io) { |
1296
|
2674 |
29 |
if (IoIFP(io)) { |
1298
|
2 |
27 |
} else if (IoDIRP(io)) { |
1306
|
34 |
531487 |
else if ((PL_op->op_private & (OPpFT_STACKED|OPpFT_AFTER_t)) |
1313
|
0 |
531487 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
0 |
0 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
30 |
531457 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
0 |
30 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
1812 |
529645 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
1719 |
93 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
0 |
1719 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
1719 |
0 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
0 |
1719 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
1719 |
0 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
|
1749 |
529738 |
if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { |
1316
|
93 |
529645 |
else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { |
|
27 |
66 |
else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { |
1322
|
529621 |
90 |
s = SvPV_flags_const(sv, len, flags); |
1328
|
69617 |
460094 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n')) |
|
26611 |
43006 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n')) |
|
0 |
26611 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n')) |
1344
|
168 |
194227 |
if (PL_op->op_flags & OPf_REF) { |
1345
|
162 |
6 |
if (cGVOP_gv == PL_defgv) { |
1346
|
3 |
159 |
if (PL_laststype != OP_LSTAT) |
1351
|
3 |
3 |
if (ckWARN(WARN_IO)) { |
1355
|
3 |
0 |
HEKfARG(GvENAME_HEK(cGVOP_gv))); |
1359
|
4 |
194223 |
if ((PL_op->op_private & (OPpFT_STACKED|OPpFT_AFTER_t)) |
1361
|
3 |
1 |
if (PL_laststype != OP_LSTAT) |
1368
|
9 |
194214 |
if ( ( (SvROK(sv) && ( isGV_with_GP(SvRV(sv)) |
|
5 |
4 |
if ( ( (SvROK(sv) && ( isGV_with_GP(SvRV(sv)) |
|
0 |
5 |
if ( ( (SvROK(sv) && ( isGV_with_GP(SvRV(sv)) |
1369
|
2 |
2 |
|| (isio = SvTYPE(SvRV(sv)) == SVt_PVIO) ) |
1371
|
2 |
194214 |
|| isGV_with_GP(sv) |
|
2 |
0 |
|| isGV_with_GP(sv) |
1373
|
5 |
4 |
&& ckWARN(WARN_IO)) { |
1374
|
1 |
4 |
if (isio) |
1382
|
3 |
1 |
GvENAME_HEK((const GV *) |
|
4 |
0 |
GvENAME_HEK((const GV *) |
|
3 |
1 |
GvENAME_HEK((const GV *) |
|
0 |
0 |
GvENAME_HEK((const GV *) |
1385
|
194210 |
13 |
file = SvPV_flags_const_nolen(sv, flags); |
1388
|
15 |
194208 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(file, '\n')) |
|
5 |
10 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(file, '\n')) |
|
0 |
5 |
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(file, '\n')) |
1398
|
2 |
3 |
if (ckWARN(WARN_EXEC)) |
1401
|
0 |
5 |
if (do_report) { |
1416
|
5 |
0 |
if (sp > mark) { |
1419
|
0 |
5 |
Newx(PL_Argv, sp - mark + 1, const char*); |
1422
|
10 |
5 |
while (++mark <= sp) { |
1423
|
10 |
0 |
if (*mark) |
1424
|
9 |
1 |
*a++ = SvPV_nolen_const(*mark); |
1429
|
0 |
5 |
if (really) |
1430
|
0 |
0 |
tmps = SvPV_nolen_const(really); |
1431
|
5 |
0 |
if ((!really && *PL_Argv[0] != '/') || |
|
0 |
5 |
if ((!really && *PL_Argv[0] != '/') || |
|
0 |
0 |
if ((!really && *PL_Argv[0] != '/') || |
1432
|
0 |
0 |
(really && *tmps != '/')) /* will execvp use PATH? */ |
1433
|
0 |
5 |
TAINT_ENV(); /* testing IFS here is overkill, probably */ |
1435
|
0 |
5 |
if (really && *tmps) |
|
0 |
0 |
if (really && *tmps) |
1440
|
5 |
0 |
S_exec_failed(aTHX_ (really ? tmps : PL_Argv[0]), fd, do_report); |
1476
|
0 |
0 |
while (*cmd && isSPACE(*cmd)) |
|
0 |
0 |
while (*cmd && isSPACE(*cmd)) |
1518
|
0 |
0 |
if (*cmd == '.' && isSPACE(cmd[1])) |
|
0 |
0 |
if (*cmd == '.' && isSPACE(cmd[1])) |
1521
|
0 |
0 |
if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4])) |
|
0 |
0 |
if (strnEQ(cmd,"exec",4) && isSPACE(cmd[4])) |
1525
|
0 |
0 |
while (isWORDCHAR(*s)) |
1527
|
0 |
0 |
if (*s == '=') |
1530
|
0 |
0 |
for (s = cmd; *s; s++) { |
1531
|
0 |
0 |
if (*s != ' ' && !isALPHA(*s) && |
|
0 |
0 |
if (*s != ' ' && !isALPHA(*s) && |
|
0 |
0 |
if (*s != ' ' && !isALPHA(*s) && |
1533
|
0 |
0 |
if (*s == '\n' && !s[1]) { |
|
0 |
0 |
if (*s == '\n' && !s[1]) { |
1538
|
0 |
0 |
if (*s == '>' && s[1] == '&' && s[2] == '1' |
|
0 |
0 |
if (*s == '>' && s[1] == '&' && s[2] == '1' |
|
0 |
0 |
if (*s == '>' && s[1] == '&' && s[2] == '1' |
1539
|
0 |
0 |
&& s > cmd + 1 && s[-1] == '2' && isSPACE(s[-2]) |
|
0 |
0 |
&& s > cmd + 1 && s[-1] == '2' && isSPACE(s[-2]) |
|
0 |
0 |
&& s > cmd + 1 && s[-1] == '2' && isSPACE(s[-2]) |
1540
|
0 |
0 |
&& (!s[3] || isSPACE(s[3]))) |
|
0 |
0 |
&& (!s[3] || isSPACE(s[3]))) |
1544
|
0 |
0 |
while (*t && isSPACE(*t)) |
|
0 |
0 |
while (*t && isSPACE(*t)) |
1546
|
0 |
0 |
if (!*t && (PerlLIO_dup2(1,2) != -1)) { |
|
0 |
0 |
if (!*t && (PerlLIO_dup2(1,2) != -1)) { |
1561
|
0 |
0 |
Newx(PL_Argv, (s - cmd) / 2 + 2, const char*); |
1564
|
0 |
0 |
for (s = PL_Cmd; *s;) { |
1565
|
0 |
0 |
while (isSPACE(*s)) |
1567
|
0 |
0 |
if (*s) |
1569
|
0 |
0 |
while (*s && !isSPACE(*s)) |
|
0 |
0 |
while (*s && !isSPACE(*s)) |
1571
|
0 |
0 |
if (*s) |
1575
|
0 |
0 |
if (PL_Argv[0]) { |
1579
|
0 |
0 |
if (errno == ENOEXEC) { /* for system V NIH syndrome */ |
1631
|
0 |
93396 |
if (TAINTING_get) { |
1632
|
0 |
0 |
while (++mark <= sp) { |
1633
|
0 |
0 |
if (SvTAINTED(*mark)) { |
|
0 |
0 |
if (SvTAINTED(*mark)) { |
1642
|
0 |
22211 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1643
|
22142 |
69 |
if (++mark <= sp) { |
1644
|
22140 |
2 |
val = SvIV(*mark); |
1645
|
0 |
22142 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1647
|
22873 |
22142 |
while (++mark <= sp) { |
1649
|
2 |
22871 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
22873 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
22871 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
2 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
22872 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
1650
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
1652
|
0 |
1 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1653
|
1 |
0 |
if (fchmod(PerlIO_fileno(IoIFP(GvIOn(gv))), val)) |
|
1 |
0 |
if (fchmod(PerlIO_fileno(IoIFP(GvIOn(gv))), val)) |
|
1 |
0 |
if (fchmod(PerlIO_fileno(IoIFP(GvIOn(gv))), val)) |
|
1 |
0 |
if (fchmod(PerlIO_fileno(IoIFP(GvIOn(gv))), val)) |
|
0 |
1 |
if (fchmod(PerlIO_fileno(IoIFP(GvIOn(gv))), val)) |
1664
|
22869 |
3 |
const char *name = SvPV_nomg_const_nolen(*mark); |
1665
|
0 |
22872 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1676
|
0 |
82 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1677
|
10 |
72 |
if (sp - mark > 2) { |
1679
|
8 |
2 |
val = SvIVx(*++mark); |
1680
|
10 |
0 |
val2 = SvIVx(*++mark); |
1681
|
0 |
10 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1683
|
12 |
10 |
while (++mark <= sp) { |
1685
|
2 |
10 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
12 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
10 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
2 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
11 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
1686
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
1688
|
0 |
1 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1689
|
1 |
0 |
if (fchown(PerlIO_fileno(IoIFP(GvIOn(gv))), val, val2)) |
|
1 |
0 |
if (fchown(PerlIO_fileno(IoIFP(GvIOn(gv))), val, val2)) |
|
1 |
0 |
if (fchown(PerlIO_fileno(IoIFP(GvIOn(gv))), val, val2)) |
|
1 |
0 |
if (fchown(PerlIO_fileno(IoIFP(GvIOn(gv))), val, val2)) |
|
0 |
1 |
if (fchown(PerlIO_fileno(IoIFP(GvIOn(gv))), val, val2)) |
1700
|
8 |
3 |
const char *name = SvPV_nomg_const_nolen(*mark); |
1701
|
0 |
11 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1719
|
0 |
30174 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1720
|
30174 |
0 |
if (mark == sp) |
1722
|
30056 |
118 |
s = SvPVx_const(*++mark, len); |
1723
|
9 |
30165 |
if (*s == '-' && isALPHA(s[1])) |
|
0 |
9 |
if (*s == '-' && isALPHA(s[1])) |
1729
|
46 |
30128 |
if (isALPHA(*s)) { |
1730
|
6 |
40 |
if (*s == 'S' && s[1] == 'I' && s[2] == 'G') { |
|
6 |
0 |
if (*s == 'S' && s[1] == 'I' && s[2] == 'G') { |
|
6 |
0 |
if (*s == 'S' && s[1] == 'I' && s[2] == 'G') { |
1734
|
0 |
46 |
if ((val = whichsig_pvn(s, len)) < 0) |
1739
|
30044 |
84 |
val = SvIV(*mark); |
1740
|
9 |
30119 |
if (val < 0) |
1746
|
0 |
30174 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1782
|
25 |
30067 |
while (++mark <= sp) { |
|
30092 |
30171 |
while (++mark <= sp) { |
1785
|
6 |
30086 |
if (!(SvNIOK(*mark) || looks_like_number(*mark))) |
|
3 |
3 |
if (!(SvNIOK(*mark) || looks_like_number(*mark))) |
1787
|
30086 |
3 |
proc = SvIV_nomg(*mark); |
1788
|
9 |
30080 |
if (killgp) |
1792
|
0 |
30089 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1793
|
29996 |
93 |
if (PerlProc_kill(proc, val)) |
1796
|
7 |
30164 |
PERL_ASYNC_CHECK(); |
1800
|
30 |
39309 |
APPLY_TAINT_PROPER(); |
|
0 |
30 |
APPLY_TAINT_PROPER(); |
1802
|
40000 |
39339 |
while (++mark <= sp) { |
1803
|
39990 |
10 |
s = SvPV_nolen_const(*mark); |
1804
|
62 |
39938 |
APPLY_TAINT_PROPER(); |
|
0 |
62 |
APPLY_TAINT_PROPER(); |
1805
|
7 |
39993 |
if (!IS_SAFE_PATHNAME(*mark, "unlink")) { |
1808
|
0 |
39993 |
else if (PerlProc_geteuid() || PL_unsafe) { |
|
0 |
0 |
else if (PerlProc_geteuid() || PL_unsafe) { |
1809
|
27876 |
12117 |
if (UNLINK(s)) |
1813
|
0 |
0 |
if (PerlLIO_lstat(s,&PL_statbuf) < 0 || S_ISDIR(PL_statbuf.st_mode)) |
|
0 |
0 |
if (PerlLIO_lstat(s,&PL_statbuf) < 0 || S_ISDIR(PL_statbuf.st_mode)) |
1816
|
0 |
0 |
if (UNLINK(s)) |
1824
|
0 |
1590 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1825
|
1586 |
4 |
if (sp - mark > 2) { |
1847
|
7 |
1579 |
if ( accessed == &PL_sv_undef && modified == &PL_sv_undef ) |
|
0 |
7 |
if ( accessed == &PL_sv_undef && modified == &PL_sv_undef ) |
1852
|
1563 |
16 |
utbuf[0].tv_sec = (long)SvIV(accessed); /* time accessed */ |
1854
|
1579 |
0 |
utbuf[1].tv_sec = (long)SvIV(modified); /* time modified */ |
1864
|
0 |
1586 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1866
|
1590 |
1586 |
while (++mark <= sp) { |
1868
|
0 |
1590 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
1590 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
1588 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
2 |
0 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
2 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
0 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
|
1 |
1589 |
if ((gv = MAYBE_DEREF_GV(*mark))) { |
1869
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
|
1 |
0 |
if (GvIO(gv) && IoIFP(GvIOp(gv))) { |
1871
|
0 |
1 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1872
|
1 |
0 |
if (futimes(PerlIO_fileno(IoIFP(GvIOn(gv))), |
|
1 |
0 |
if (futimes(PerlIO_fileno(IoIFP(GvIOn(gv))), |
|
1 |
0 |
if (futimes(PerlIO_fileno(IoIFP(GvIOn(gv))), |
|
1 |
0 |
if (futimes(PerlIO_fileno(IoIFP(GvIOn(gv))), |
|
0 |
1 |
if (futimes(PerlIO_fileno(IoIFP(GvIOn(gv))), |
1884
|
1588 |
1 |
const char * const name = SvPV_nomg_const_nolen(*mark); |
1885
|
0 |
1589 |
APPLY_TAINT_PROPER(); |
|
0 |
0 |
APPLY_TAINT_PROPER(); |
1886
|
6 |
1583 |
if (!IS_SAFE_PATHNAME(*mark, "utime")) { |
1891
|
16 |
1567 |
if (utimes(name, (struct timeval *)utbufp)) |
1950
|
18705 |
87 |
if ((effective ? PerlProc_geteuid() : PerlProc_getuid()) == 0) { /* root is special */ |
|
0 |
18792 |
if ((effective ? PerlProc_geteuid() : PerlProc_getuid()) == 0) { /* root is special */ |
1952
|
0 |
0 |
if (mode == S_IXUSR) { |
1953
|
0 |
0 |
if (statbufp->st_mode & 0111 || S_ISDIR(statbufp->st_mode)) |
|
0 |
0 |
if (statbufp->st_mode & 0111 || S_ISDIR(statbufp->st_mode)) |
1960
|
18705 |
87 |
if (statbufp->st_uid == (effective ? PerlProc_geteuid() : PerlProc_getuid()) ) { |
|
13382 |
5410 |
if (statbufp->st_uid == (effective ? PerlProc_geteuid() : PerlProc_getuid()) ) { |
1961
|
6536 |
6846 |
if (statbufp->st_mode & mode) |
1964
|
0 |
5410 |
else if (ingroup(statbufp->st_gid,effective)) { |
1965
|
0 |
0 |
if (statbufp->st_mode & mode >> 3) |
1968
|
0 |
5410 |
else if (statbufp->st_mode & mode >> 6) |
1979
|
5410 |
0 |
if (testgid == (effective ? PerlProc_getegid() : PerlProc_getgid())) |
|
5410 |
0 |
if (testgid == (effective ? PerlProc_getegid() : PerlProc_getgid())) |
1988
|
0 |
5410 |
Newx(gary, anum, Groups_t); |
1990
|
10820 |
5410 |
while (--anum >= 0) |
1991
|
10820 |
0 |
if (gary[anum] == testgid) { |
2010
|
0 |
7 |
const key_t key = (key_t)SvNVx(*++mark); |
2011
|
5 |
2 |
SV *nsv = optype == OP_MSGGET ? NULL : *++mark; |
2012
|
7 |
0 |
const I32 flags = SvIVx(*++mark); |
2026
|
2 |
0 |
return semget(key, (int) SvIV(nsv), flags); |
2030
|
0 |
3 |
return shmget(key, (size_t) SvUV(nsv), flags); |
2047
|
25 |
0 |
const I32 id = SvIVx(*++mark); |
2049
|
15 |
10 |
const I32 n = (optype == OP_SEMCTL) ? SvIVx(*++mark) : 0; |
|
15 |
0 |
const I32 n = (optype == OP_SEMCTL) ? SvIVx(*++mark) : 0; |
2051
|
25 |
0 |
const I32 cmd = SvIVx(*++mark); |
2063
|
3 |
2 |
if (cmd == IPC_STAT || cmd == IPC_SET) |
2069
|
2 |
3 |
if (cmd == IPC_STAT || cmd == IPC_SET) |
2076
|
13 |
2 |
if (cmd == IPC_STAT || cmd == IPC_SET) |
2078
|
8 |
5 |
else if (cmd == GETALL || cmd == SETALL) |
2088
|
8 |
0 |
if (Semctl(id, 0, IPC_STAT, semun) == -1) |
2107
|
15 |
10 |
if (infosize) |
2109
|
11 |
4 |
if (getinfo) |
2111
|
6 |
5 |
SvPV_force_nolen(astr); |
2112
|
11 |
0 |
a = SvGROW(astr, infosize+1); |
|
5 |
6 |
a = SvGROW(astr, infosize+1); |
2117
|
4 |
0 |
a = SvPV(astr, len); |
2118
|
0 |
4 |
if (len != infosize) |
2127
|
10 |
0 |
const IV i = SvIV(astr); |
2162
|
11 |
14 |
if (getinfo && ret >= 0) { |
2165
|
0 |
11 |
SvSETMAGIC(astr); |
2176
|
2 |
0 |
const I32 id = SvIVx(*++mark); |
2178
|
2 |
0 |
const I32 flags = SvIVx(*++mark); |
2179
|
2 |
0 |
const char * const mbuf = SvPV_const(mstr, len); |
2185
|
0 |
2 |
if (msize < 0) |
2206
|
2 |
0 |
const I32 id = SvIVx(*++mark); |
2213
|
0 |
2 |
if (! SvOK(mstr)) |
|
0 |
0 |
if (! SvOK(mstr)) |
|
0 |
0 |
if (! SvOK(mstr)) |
2215
|
2 |
0 |
msize = SvIVx(*++mark); |
2216
|
2 |
0 |
mtype = (long)SvIVx(*++mark); |
2217
|
2 |
0 |
flags = SvIVx(*++mark); |
2218
|
2 |
0 |
SvPV_force_nolen(mstr); |
2219
|
2 |
0 |
mbuf = SvGROW(mstr, sizeof(long)+msize+1); |
|
2 |
0 |
mbuf = SvGROW(mstr, sizeof(long)+msize+1); |
2223
|
2 |
0 |
if (ret >= 0) { |
2228
|
0 |
2 |
SvTAINTED_on(mstr); |
2247
|
1 |
0 |
const I32 id = SvIVx(*++mark); |
2249
|
1 |
0 |
const char * const opbuf = SvPV_const(opstr, opsize); |
2254
|
1 |
0 |
if (opsize < 3 * SHORTSIZE |
2255
|
0 |
1 |
|| (opsize % (3 * SHORTSIZE))) { |
2269
|
0 |
1 |
Newx (temps, nsops, struct sembuf); |
2271
|
1 |
1 |
while (i--) { |
2281
|
1 |
1 |
while (i--) { |
2303
|
15 |
0 |
const I32 id = SvIVx(*++mark); |
2305
|
15 |
0 |
const I32 mpos = SvIVx(*++mark); |
2306
|
15 |
0 |
const I32 msize = SvIVx(*++mark); |
2312
|
15 |
0 |
if (shmctl(id, IPC_STAT, &shmds) == -1) |
2314
|
15 |
0 |
if (mpos < 0 || msize < 0 |
2315
|
0 |
15 |
|| (size_t)mpos + msize > (size_t)shmds.shm_segsz) { |
2319
|
8 |
7 |
shm = (char *)shmat(id, NULL, (optype == OP_SHMREAD) ? SHM_RDONLY : 0); |
2320
|
15 |
0 |
if (shm == (char *)-1) /* I hate System V IPC, I really do */ |
2322
|
7 |
8 |
if (optype == OP_SHMREAD) { |
|
1 |
6 |
if (optype == OP_SHMREAD) { |
|
2 |
5 |
if (optype == OP_SHMREAD) { |
2327
|
2 |
5 |
if (! SvOK(mstr)) |
|
2 |
0 |
if (! SvOK(mstr)) |
|
2 |
0 |
if (! SvOK(mstr)) |
2330
|
3 |
4 |
mbuf = SvGROW(mstr, (STRLEN)msize+1); |
|
1 |
2 |
mbuf = SvGROW(mstr, (STRLEN)msize+1); |
2335
|
1 |
6 |
SvSETMAGIC(mstr); |
2338
|
0 |
7 |
SvTAINTED_on(mstr); |
2344
|
7 |
1 |
const char *mbuf = SvPV_const(mstr, len); |
2345
|
8 |
0 |
const I32 n = ((I32)len > msize) ? msize : (I32)len; |
2347
|
0 |
8 |
if (n < msize) |
2382
|
219 |
0 |
if (!IS_SAFE_SYSCALL(tmpglob, "pattern", "glob")) |
2433
|
219 |
0 |
if (home && *home) SvGETMAGIC(*home); |
|
219 |
0 |
if (home && *home) SvGETMAGIC(*home); |
|
0 |
219 |
if (home && *home) SvGETMAGIC(*home); |
2434
|
219 |
0 |
if (path && *path) SvGETMAGIC(*path); |
|
219 |
0 |
if (path && *path) SvGETMAGIC(*path); |
|
0 |
219 |
if (path && *path) SvGETMAGIC(*path); |
2436
|
219 |
0 |
if (home && *home) SvSETMAGIC(*home); |
|
219 |
0 |
if (home && *home) SvSETMAGIC(*home); |
|
219 |
0 |
if (home && *home) SvSETMAGIC(*home); |
2437
|
219 |
0 |
if (path && *path) SvSETMAGIC(*path); |
|
219 |
0 |
if (path && *path) SvSETMAGIC(*path); |
|
219 |
0 |
if (path && *path) SvSETMAGIC(*path); |