[openib-general] [PATCH] osm: 'chmod' on Windows
Hal Rosenstock
halr at voltaire.com
Mon Nov 27 05:32:15 PST 2006
On Sun, 2006-11-26 at 15:01, Yevgeny Kliteynik wrote:
> Sasha Khapyorsky wrote:
> > On 18:28 Sun 26 Nov , Yevgeny Kliteynik wrote:
> >> Sasha Khapyorsky wrote:
> >>> On 17:51 Sun 26 Nov , Yevgeny Kliteynik wrote:
> >>>> Sasha Khapyorsky wrote:
> >>>>> On 15:22 Sun 26 Nov , Yevgeny Kliteynik wrote:
> >>>>>> Fixing to match 'chmod' implementation on Windows.
> >>>>>> Note that on Windows 'chmod' there's no such thing
> >>>>>> as user/group/all permissions - the permissions are
> >>>>>> aways for 'all'.
> >>>>>> Don't see why this would be a problem in this case,
> >>>>>> but still - worth mentioning.
> >>>>> It is because SA dump file contains privileged information like lists
> >>>>> of subscribed ports.
> >>>> Well, since it's being dumped in the same directory as the OSM log,
> >>>> I guess it gets the same protection as the OSM log does, doesn't it?
> >>> No, the file is readable by owner only.
> >> IMHO, the directory where OSM log is written is readable only by owner (which is administrator).
> >
> > By default it is written to /var/log which is world readable.
> >
> >> If administrator choses to write osm log to some directory that is accessible to all users,
> >> there's no way to remove read permissions from a certain *file* when doing fopen().
> >
> > After it was chmod()ed? Why? (and yes, there is small "hole" between
> > fopen() and chmod()).
> >
> >> Same with SA dump file when doing chmod(), so as long as it is dumped in a protected directory,
> >> it gets the same level of protection as the osm.log.
> >>
> >> Anyway, what I'm saying is that I think that it's ok to use (_S_IREAD | _S_IWRITE) on windows
> >> instead of S_IRUSR | S_IWUSR) on Linux.
> >
> > All you are saying is about windows only? Well, I don't know then
> > (thought your question was why chmod() is needed :)).
>
> Yes, I was talking about Windows only.
> So anyway, I guess we're cool now with the change.
Hi Yevgeny,
Just to make sure I understand:
The net of this is the only pending change relative to this is Sasha's
original patch, right ?
-- Hal
> -- Yevgeny
>
> >
> > Sasha
> >
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
More information about the general
mailing list