Re: CVS commit: src/games/phantasia

2013-02-17 Thread Martin Husemann
On Sat, Feb 16, 2013 at 05:00:21PM +, Jared D. McNeill wrote:
 Module Name:  src
 Committed By: jmcneill
 Date: Sat Feb 16 17:00:21 UTC 2013
 
 Modified Files:
   src/games/phantasia: Makefile
 
 Log Message:
 Rename 'setup' host tool to 'mkdata' to make UAC happen when building with 
 Cygwin.
 

For those happy to never been exposed to this acronym: he is talking about
the Windows User Annoyance Coolaid which campaigns with it's brother VUS
(Keep virtualy all Users Stupid) to make expert users (defined as those
users that grok the concept of a pathname) look like complete idiots.

Martin
P.S.: seriously, I think the commit message should be fixed, windows 
termionloogy moves faster than marketing buzzwords, so you should explain
that something claiming to be a user protection feature of windows makes
it painfull to automatically run binaries called setup.


Re: CVS commit: src/games/phantasia

2013-02-17 Thread Jared McNeill

On Sun, 17 Feb 2013, Martin Husemann wrote:

For those happy to never been exposed to this acronym: he is talking about
the Windows User Annoyance Coolaid which campaigns with it's brother VUS
(Keep virtualy all Users Stupid) to make expert users (defined as those
users that grok the concept of a pathname) look like complete idiots.


Let me explain the issue to you, as this is not (directly) about user 
protection, but instead about compat. The UAC executable name check was 
added in Vista, since administrative users don't run every executable with 
admin privileges. In this case, the run as administrator UAC dialog is 
there to help legacy software installers. Under Cygwin (where I'm running 
build.sh), it doesn't guarantee that a GUI is available to present the 
UAC dialog, so legacy executables try to elevate privileges, and fail (no 
GUI!) so permission denied is returned. This behaviour can be overriden by 
supplying a prog.exe.manifest file that specifies the requested 
permissions. Christos fixed this in bsd.hostprog.mk but the two culprits 
in src/games don't use that mechanism (and should probably be fixed to do 
so).


Re: CVS commit: src/usr.bin/vis

2013-02-17 Thread Alan Barrett

On Thu, 14 Feb 2013, Christos Zoulas wrote:

Modified Files:
src/usr.bin/vis: vis.c

More fixes from J.R. Oldroyd:



- In the call to strvisx() the count must be 1, not mbilen
 which can be 2 or 3 etc for a multibyte character.  This
 value is a count of characters - not bytes - to process.
 It even says characters in the man page.  In vis(3) I
 am interpreting this value to mean multibyte characters.


In general, the caller of str[n]vis[x] knows how many bytes of 
data they have, but they do not know how many multibyte characters 
that might represent.  If the man page talks about characters, 
that's because it was written at a time when vis did not attempt 
to deal with multibyte characters.  I think that we should revert 
to the original semantics of lengths being measured in bytes, and 
adjust both the man pages and callers appropriately.


--apb (Alan Barrett)


Re: CVS commit: src/games/phantasia

2013-02-17 Thread Martin Husemann
On Sun, Feb 17, 2013 at 09:39:18AM -0500, Jared McNeill wrote:
 permissions. Christos fixed this in bsd.hostprog.mk but the two culprits 
 in src/games don't use that mechanism (and should probably be fixed to do 
 so).

I understand - but the point is: a cvs log refering to an unqualified acronym
like UAC may be completely unparsable for most users in five years from now
if you do not qualify it or explain a bit of background. Even users knowing
about UAC in general and associating it with the run with admin privs
dialog may not know about the very stupid implementation details like
wildcard name matches on the binaries. Certainly the binaries you touched
do not actually require admin privs on cygwin, or if so, that would be
another bug.

Martin


Re: CVS commit: src/games/phantasia

2013-02-17 Thread Jared McNeill
I've updated the commit message for src/games/phantasia/Makefile r1.36 and 
src/games/adventure/Makefile r1.14 to clarify the issue:


Workaround a toolchain issue by renaming the 'setup' host tool to 'mkdata' 
to make UAC happy when building with Cygwin. As described here --  
http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx --  
32-bit executables whose filenames include the strings 'install', 'setup', 
'update', 'patch', etc. by default will request admin privileges unless an 
application manifest is provided. 



Re: CVS commit: src/usr.bin/vis

2013-02-17 Thread David Holland
On Sun, Feb 17, 2013 at 08:58:41PM +0200, Alan Barrett wrote:
  On Thu, 14 Feb 2013, Christos Zoulas wrote:
  Modified Files:
  src/usr.bin/vis: vis.c
  
  More fixes from J.R. Oldroyd:
  
  - In the call to strvisx() the count must be 1, not mbilen
   which can be 2 or 3 etc for a multibyte character.  This
   value is a count of characters - not bytes - to process.
   It even says characters in the man page.  In vis(3) I
   am interpreting this value to mean multibyte characters.
  
  In general, the caller of str[n]vis[x] knows how many bytes of data
  they have, but they do not know how many multibyte characters that
  might represent.  If the man page talks about characters, that's
  because it was written at a time when vis did not attempt to deal
  with multibyte characters.  I think that we should revert to the
  original semantics of lengths being measured in bytes, and adjust
  both the man pages and callers appropriately.

concur

-- 
David A. Holland
dholl...@netbsd.org