Bug #66923 [NEW]: rsync falls when running with exec
| From: | beaux_monde at tut dot by | Date: | Tue, 18 Mar 2014 13:49:33 +0000 |
| Subject: | Bug #66923 [NEW]: rsync falls when running with exec | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-184819@lists.php.net to get a copy of this message | ||
From: beaux_monde at tut dot by
Operating system: Arch Linux
PHP version: 5.5.10
Package: Apache2 related
Bug Type: Bug
Bug description:rsync falls when running with exec
Description:
------------
After update of php from 5.5.9 to 5.5.10 and apache from 2.2.26 to 2.4.7
rsync got falling while synchronization process.
Test script:
---------------
array($out);
exec("rsync -auzvvvvvvvvv --delete --temp-dir='bad/' --exclude='/bad'
--exclude='.htaccess' ./generated/ $host:/some/dir/", $out);
Expected result:
----------------
Synchronization have to executed.
Actual result:
--------------
Synchronization falls at some stage without actual transferring of a
files with error code 13. $out contains reference to a line 244 of a
rsync's log.c. Here it:
static void filtered_fwrite(FILE *f, const char *buf, int len, int
use_isprint)
{
const char *s, *end = buf + len;
for (s = buf; s < end; s++) {
if ((s < end - 4
&& *s == '\\' && s[1] == '#'
&& isDigit(s + 2)
&& isDigit(s + 3)
&& isDigit(s + 4))
|| (*s != '\t'
&& ((use_isprint && !isPrint(s))
|| *(uchar*)s < ' '))) {
if (s != buf && fwrite(buf, s - buf, 1, f) != 1)
exit_cleanup(RERR_MESSAGEIO);
fprintf(f, "\\#%03o", *(uchar*)s);
buf = s + 1;
}
}
if (buf != end && fwrite(buf, end - buf, 1, f) != 1)
exit_cleanup(RERR_MESSAGEIO); // <<< *** This is line 244 ***
}
--
Edit bug report at https://bugs.php.net/bug.php?id=66923&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66923&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66923&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66923&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66923&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66923&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66923&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66923&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66923&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66923&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66923&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66923&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66923&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66923&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66923&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66923&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66923&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66923&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66923&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66923&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66923&r=mysqlcfg