[Mauiusers] Patch to fix a possible double free

Josh Butikofer josh at clusterresources.com
Fri Aug 10 16:42:03 MDT 2007


Stanislav,

I'm not sure I understand what you mean by "daemon should duplicate all standard descriptors to
/dev/null." Perhaps you can help me in my ignorance.

Your double free patch/fix was already applied in the source code (see the latest patch snapshot).

-- 
Joshua Butikofer
Cluster Resources, Inc.

josh at clusterresources.com
Voice: (801) 717-3707
Fax:   (801) 717-3738
--------------------------


Stanislav Ievlev wrote:
> Greetings!
> 
> I've made a patch to fix a double free memory corruption (see in attach to
> this message).
> 
> It's also another little problem.
> Daemon should duplicate all standard
> descriptors to /dev/null.
> 
> Current implementation doesn't make it:
> --
> #/usr/sbin/maui
> # pidof maui
> 4336
> # LANG=C ls -al /proc/4336/fd
> total 11
> dr-x------ 2 root  root   0 Aug 10 15:27 .
> dr-xr-xr-x 5 _maui _maui  0 Aug 10 15:27 ..
> lrwx------ 1 root  root  64 Aug 10 15:27 0 -> /dev/pts/3
> lrwx------ 1 root  root  64 Aug 10 15:27 1 -> /dev/pts/3
> lrwx------ 1 root  root  64 Aug 10 15:27 10 -> socket:[3922076]
> lrwx------ 1 root  root  64 Aug 10 15:27 2 -> /dev/pts/3
> lrwx------ 1 root  root  64 Aug 10 15:27 3 -> /var/spool/maui/log/maui.log
> lr-x------ 1 root  root  64 Aug 10 15:27 4 -> /dev/null
> lrwx------ 1 root  root  64 Aug 10 15:27 5 -> socket:[3922058]
> lrwx------ 1 root  root  64 Aug 10 15:27 6 -> /var/spool/maui/stats/_2007
> lrwx------ 1 root  root  64 Aug 10 15:27 7 -> socket:[3922065]
> lrwx------ 1 root  root  64 Aug 10 15:27 8 -> socket:[3922066]
> lrwx------ 1 root  root  64 Aug 10 15:27 9 -> socket:[3922067]
> --
> 
> --
> With best regards
> Stanislav Ievlev.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -Naur maui.orig/src/moab/MStats.c maui/src/moab/MStats.c
> --- maui.orig/src/moab/MStats.c	2007-03-29 00:05:39 +0400
> +++ maui/src/moab/MStats.c	2007-08-10 15:24:32 +0400
> @@ -2709,7 +2709,7 @@
>  int MStatShutdown()
>  
>    {
> -  if (MSched.statfp != NULL)
> +  if ((MSched.statfp != NULL) && (MSched.statfp != mlog.logfp))
>      {
>      fclose(MSched.statfp);
>   
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mauiusers mailing list
> mauiusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/mauiusers


More information about the mauiusers mailing list