]> granicus.if.org Git - sudo/commitdiff
Document Solaris 11 locale issues and workarounds.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 8 Nov 2012 20:22:44 +0000 (15:22 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 8 Nov 2012 20:22:44 +0000 (15:22 -0500)
INSTALL
doc/TROUBLESHOOTING

diff --git a/INSTALL b/INSTALL
index 9effdd1465f6eb2d5fadd6039a4c6ba6aecd9f73..e2bcc098e0c3d8ca11924e32edd079912ca5df76 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -738,14 +738,16 @@ Linux:
     fixed.  There is a workaround on the sudo ftp site, linux_nfs.patch,
     if you need to NFS-mount sudoers on older Linux kernels.
 
-Solaris 2.x:
+Solaris:
     You need to have a C compiler in order to build sudo.  Since
-    Solaris 2.x does not come with one by default this means that
-    you either need to install the Sun Studio compiler suite,
-    available for free from www.sun.com, or have a copy of the GNU
-    C compiler (gcc) which is distributed on the Solaris Companion
-    CD.  You can also get them from various places on the net,
-    including http://www.sunfreeware.com/
+    Solaris does not come with one by default this means that you
+    either need to either install the Solaris Studio compiler suite,
+    available for free from www.oracle.com, or have a copy of the
+    GNU C compiler (gcc) which is can be installed via the pkg
+    utility on Solaris 11 and higher and is distributed on the
+    Solaris Companion CD for older Solaris releases.  You can also
+    get them from various places on the net, including
+    http://www.sunfreeware.com/
     NOTE: sudo will *not* build with the sun C compiler in BSD
           compatibility mode (/usr/ucb/cc).  Sudo is designed to
           compile with the standard C compiler (or gcc) and will
@@ -760,6 +762,9 @@ Solaris 2.x:
          If you have having problems with sudo logging you should
          make sure you have the latest syslogd patch installed.
          This is a problem for Solaris 2.4 and 2.5 at least.
+    Sudo NLS support may not work properly with Solaris 11 due to
+    how the runpath is specified in the locale-specific shared
+    objects.  See the TROUBLESHOOTING file for a workaround.
 
 Mac OS X:
     The pseudo-tty support in the Mac OS X kernel has bugs related
index c3a9b139122db4ba0352f6743beebd741762d25b..7a5f3713903f4d84b8dd10494cdef1f837744957 100644 (file)
@@ -182,6 +182,17 @@ A) Starting with Solaris 2.6, snprintf(3) is included in the standard
        #define HAVE_VSNPRINTF 1
    and run make.
 
+Q) I built sudo on a Solaris 11 (or higher) machine but the resulting
+   binary doesn't work older Solaris versions.  Why?
+
+A) Starting with Solaris 11, asprintf(3) is included in the standard
+   C library.  To build a version of sudo on a Solaris 11 machine that
+   will run on an older Solaris release, edit config.h and comment out
+   the lines:
+       #define HAVE_ASPRINTF 1
+       #define HAVE_VASPRINTF 1
+   and run make.
+
 Q) When I run "visudo" it says "sudoers file busy, try again later."
    and doesn't do anything.
 A) Someone else is currently editing the sudoers file with visudo.
@@ -272,6 +283,26 @@ A) Libtool doesn't know how to support dynamic linking on the operating
    instead of just:
        --host powerpc
 
+Q) Sudo on Solaris 11 doesn't seem to be honoring my LANG, LC_ALL or
+   LC_MESSAGES environment variables.  I always get English messages,
+   not the ones for my locale.
+A) Due to security features of the Solaris dynamic linker and the
+   way the runpath is specified in the locale-specific shared
+   objects, the dynamic linker will be unable to locale the
+   methods_unicode.so.3 file.  This prevents the shared object
+   that provides locale from loading.  There are two possible
+   workarounds (you only need to do one of these).  The simplest is
+   to add a link to methods_unicode.so.3 in /usr/lib, e.g.
+
+       ln -s locale/common/methods_unicode.so.3 /usr/lib/methods_unicode.so.3 
+
+    Alternately, you can modify the runpath on the locale-specific
+    shared objects using elfedit.  For example:
+
+       for obj in /usr/lib/locale/*.UTF-8/*.UTF-8.so.*
+           elfedit -e 'dyn:runpath /usr/lib/locale/common' $obj
+       done
+
 Q) How do you pronounce `sudo'?
 A) The official pronunciation is soo-doo (for su "do").  However, an
    alternate pronunciation, a homophone of "pseudo", is also common.