This file is indexed.

/usr/sbin/upgrade-windowmaker-defaults is in wmaker-common 0.95.7-8.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#! /bin/sh
# (c) 1998 Marcelo Magallon <mmagallo@debian.org>
# this script is distributed under the terms and conditions of the GPL.
#
# TODO:
#
# * Fix that ugly hack with fix*
#   Is there something in the shell like Perl's hashes? It could be nice to
#   do something like "foreach $var (keys %fixes)" to associate fixes with
#   file names so I don't have to track things all over the place
#
# * Fix also the code that iterates over user directories to include system
#   directories in one run  
#
# upgrade-windowmaker-defaults (0.3)
# 
# * Handles upgrade to Window Maker 0.19.0
#   Logo.Clip -> Tile.Clip (crashing)
#
# upgrade-windowmaker-defaults (0.2)
# 
# * Handles keyname changes between 0.16.1 and 0.17.2
#
# Tue Jul 21 08:05:00 CST 1998
#
# upgrade-windowmaker-defaults (0.1)
# 
# * Initial release
# * Handles WindowPlaceOrigin syntax change
# * Handles name change Fiend -> Clip
#
# Sat Jun 13 16:18:36 CST 1998

# Fixes (these are not-optional changes)
# this one changes WindowPlaceOrigin = "..." to WindowPlaceOrigin = (...)
fix1='s/\(.*WindowPlaceOrigin = \)"\(.*\)";/\1(\2);/'
# and this one substitutes Fiend with Clip
fix2='s/\(.*\)Fiend\(.*\)=/\1Clip\2=/'
# this one applies to WMState
fix3='s/\( *\)Fiend\( *\)=/\1Clip\2=/'
fix4='s/\(.*\)Logo\.\(WMFiend\|WMClip\)\(.*\)=/\1Tile.WMClip\3=/'
# this one applies to Window Maker
fix5='s/\(.*\)NoSound\(.*\)=/\1DisableSound\2=/'
fix6='s/\(.*\)NoAutoWarp\(.*\)=/\1DontLinkWorspaces\2=/'
# this one is for WMWindowAttributes

# try to screen system accounts in the /etc/passwd file. If somebody
# has a better method for doing this, I'm open to suggestions. Please
# note that Debian Policy states accounts 0-99 are reserved for the
# Project, and 100 onwards *could* be used by the local sysadmin, but
# the default is 1000 and up
users='^[[:alnum:]]*:[[:alnum:]]*:[[:digit:]]\{4,\}:'

ask_n ()
{
  echo -n $*'? [yN] '
  read yn
  test -n "$yn" || yn=n
  case "$yn" in
    [yY]*)
      return 1
    ;;
    *)
      return 0
    ;;
  esac
}

apply_fix ()
{
  file_to_fix=$1; shift
  if [ -e $file_to_fix ] ; then
    echo -n "Fixing $file_to_fix... "
    while [ $# -gt 0 ] ; do
      sed -e "$1" $file_to_fix > $tempfile
      cat $tempfile > $file_to_fix
      shift
    done
    echo done.
  fi
}

ask_permission ()
{
  cat <<EOF
I can try to fix certain configuration parameters that have changed
between previous versions of Window Maker and this one, namely:

 * WindowPlaceOrigin syntax change from "..." to (...)
 * Name change of Fiend to Clip
 * WMWindowAttributes: Logo.Clip -> Tile.Clip (crashing)

NOT fixing this could prevent Window Maker from starting. Please read
/usr/doc/wmaker/NEWS.gz and /usr/doc/wmaker/changelog.gz

I will fix *both* the system defaults and each user's files.

EOF
  if ! ask_n "Do you want to proceed with the changes" ; then
    return 0
  else
    return 1
  fi
}

set -e

gs_dir=GNUstep
[ $GNUSTEP_USER_ROOT ] && gs_dir=$GNUSTEP_USER_ROOT 
gs_defaults=$gs_dir/Defaults
gs_system_defaults=/etc/GNUstep/Defaults

if [ "$1" = "--non-interactive" ] || ask_permission ; then
  tempfile=`tempfile`

  # fix users' files
  for dir in `cut -d : -f 6 /etc/passwd | sort -u` ; do
    apply_fix $dir/$gs_defaults/WindowMaker "$fix1" "$fix2" "$fix5" "$fix6"
    apply_fix $dir/$gs_defaults/WMState "$fix3"
    apply_fix $dir/$gs_defaults/WMWindowAttributes "$fix4"
  done

  # fix system files
  apply_fix $gs_system_defaults/WindowMaker "$fix1" "$fix2" "$fix5" "$fix6"
  apply_fix $gs_system_defaults/WMState "$fix3"
  apply_fix $gs_system_defaults/WMWindowAttributes "$fix4"

  rm $tempfile

cat <<EOF

Done fixing things. If you want to run this script again you can do so by
typing:

$ $0
EOF

else
cat <<EOF

Ok, leaving things as they are now... you can run this script again using:

$ $0
EOF
fi

cat <<EOF

Press [ENTER] to continue...
EOF

read dummy
exit 0