[DSE-Dev] Bug#474956: Status of this policycoreutils bug?

Václav Ovsík vaclav.ovsik at i.cz
Mon Jun 25 10:36:06 UTC 2012


Hi,

On Thu, May 17, 2012 at 08:51:42PM +0300, Touko Korpela wrote:
> Can you send new patch against current version if this issue is still
> present? Sorry for extra work, maintainer sent latest mail only to bug
> address (that isn't cc:d automatically to submitter).

sorry for a delay.
It is quite long time I wrote the code. :)

Ok, I have updated Debian Sid in the virtual machine and tried to run
se_aptitude. It still eats all the CPU thread.

The unified diff between the original version of open_init_pty.c I based
my rewrite on and the version in the current package 2.1.10-8 is:


--- open_init_pty.c.orig	2008-04-07 18:17:14.000000000 +0200
+++ /tmp/policycoreutils-2.1.10/run_init/open_init_pty.c	2012-06-25 00:11:23.000000000 +0200
@@ -153,7 +153,7 @@
 	}
 
 	if (child_pid < 0) {
-		perror("Fork:");
+		perror("forkpty():");
 		fflush(stdout);
 		fflush(stderr);
 		exit(EX_OSERR);
@@ -162,7 +162,7 @@
 		/* in the child */
 		struct termios s_tty_attr;
 		if (tcgetattr(fileno(stdin), &s_tty_attr)) {
-			perror("Child:");
+			perror("forkpty child:");
 			fflush(stdout);
 			fflush(stderr);
 			exit(EXIT_FAILURE);

So almost nothing changed.
First chunk is OK, because the error condition is caused during the call
to forkpty(). The second chunk is IMO not correct and my original
perror("tcgetattr(stdout,...)") seems to be more legit (error in the
tcgetattr()).
I'm attaching the open_init_pty.c with the cosmetic change of the first
error message. (BTW: no semicolon in the perror(), it is appended
always by perror()).

BTW: I already tried to post the code upstream in the past:
http://marc.info/?l=selinux&m=120826832520733&w=2
... and reactions.

Thanks for your time!
Kindly regards
-- 
Zito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open_init_pty.c
Type: text/x-csrc
Size: 10005 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/selinux-devel/attachments/20120625/889a7360/attachment-0001.c>


More information about the SELinux-devel mailing list