/home security problem

Andy Koppe andy.koppe@gmail.com
Sat Sep 4 08:35:00 GMT 2010


On 4 September 2010 09:19, Andy Koppe wrote:
>>> On 3 September 2010 03:04, Dave Korn wrote:
>>> >  We could restructure the logic in /etc/profile to do something like
>>> >
>>> >  if [ $HOME already exists ]
>>> >    if [ $HOME owner uid != $user uid ]
>>> >      issue warning and rename bogus home dir aside
>>> >    fi
>>> >  fi
>>> >
>>> > just before the current
>>> >
>>> >  if [ $HOME doesn't exist ]
>>> >    copy it from /etc/skel, issuing the standard first-run message.
>>> >  fi
>>> >
>>> > bit.  (Sorry pseudocode only.)
>>>
>>> Good idea. I see bash has a built-in test for whether a file belongs
>>> to the current user (-O file), so this could probably be done without
>>> incurring another fork.
>
> On, second thoughts, the 'rename bogus home dir aside' bit won't work
> for ordinary users, because they don't have the right to do so. So
> perhaps have the 'SOMEONE ELSE OWNS YOUR HOME!' warning only?

Hmm, no, that's not good enough either. I've got my Cygwin home set to
my Windows home directory (C:\Users\Andy), and that's actually owned
by the SYSTEM account.

Andy



More information about the Cygwin-developers mailing list