[PATCH 3/3] tests: add syslog.test

Dmitry V. Levin ldv at altlinux.org
Thu Mar 17 02:37:56 UTC 2016


On Tue, Mar 15, 2016 at 04:38:36PM +0800, Fei Jie wrote:
> +	int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, buf, -1);
> +	printf("syslog(SYSLOG_ACTION_READ, %p, -1) = %d %s (%m)\n",
> +	       buf, rc,
> +	       errno == ENOSYS ? "ENOSYS" : "EINVAL");

SYSLOG_ACTION_READ will return EPERM unless the process is privileged
enough.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160317/f4c1a9f3/attachment.bin>


More information about the Strace-devel mailing list