Hi,


I think there is a bug in ksh audit module. ‘FD_CLOEXEC’ flag is not set on
audit file descriptors so any child process inherit all audit files
descriptor open.



I used following patch to fix this problem:



diff -up src/cmd/ksh93/edit/history.c.fd src/cmd/ksh93/edit/history.c

--- src/cmd/ksh93/edit/history.c.fd     2010-10-20 10:24:24.665577806 -0400

+++ src/cmd/ksh93/edit/history.c        2010-10-20 10:19:49.545577426 -0400

@@ -394,6 +394,7 @@ retry:

                        }

                        if(fd>=0)

                        {

+                              fcntl(fd,F_SETFD,FD_CLOEXEC);

                                hp->tty = strdup(ttyname(2));

                                hp->auditfp =
sfnew((Sfio_t*)0,NULL,-1,fd,SF_WRITE);

                        }
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to