[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inadequate/inconsisten 'help pkg' message; problems with downloading
From: |
Sergei Steshenko |
Subject: |
Re: inadequate/inconsisten 'help pkg' message; problems with downloading |
Date: |
Sun, 7 Aug 2011 11:42:04 -0700 (PDT) |
While scrolling through 'pkg.m' my eyes stopped for a second on the source
of 'issuperuser' function:
2240 function s = issuperuser ()
2241 if ((ispc () && ! isunix ()) || (geteuid() == 0))
2242 s = true;
2243 else
2244 s = false;
2245 endif
2246 endfunction
- the file, as before, is 'octave-3.4.2/share/octave/3.4.2/m/pkg/pkg.m'.
I am not a Windows guy, but I have some doubts regarding correctness of
this function.
On a Windows machine 'ispc ()' will yield TRUE, as well as '! isunix ()',
so the result will be TRUE, i.e. the function will tell the user is
superuser - regardless of actual privileges.
However, under Windows running as Administrator is not a must. In fact,
on very rare occasions I run Windows in a VM I still prefer to run _not_
as Administrator, and I use my Administrator account only when I need
to install/remove programs.
I don't know how under Windows to determine user ID, hopefully somebody
knows and can clarify the issue of 'issuperuser' correctness under
Windows.
Regards,
Sergei.
- Re: inadequate/inconsisten 'help pkg' message; problems with downloading, (continued)
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/02
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/02
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/03
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/03
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/03
Re: inadequate/inconsisten 'help pkg' message; problems with downloading,
Sergei Steshenko <=
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/08
Re: inadequate/inconsisten 'help pkg' message; problems with downloading, Sergei Steshenko, 2011/08/15