Index: /trunk/aclocal.m4
===================================================================
--- /trunk/aclocal.m4	(revision 439)
+++ /trunk/aclocal.m4	(revision 440)
@@ -2116,5 +2116,27 @@
 ])])
 
-
+AC_DEFUN([SH_GCC_VERSION], [
+  GCC_VERSION=""
+  gcc_VERSION_MAJOR=0
+  gcc_VERSION_MINOR=0
+  AC_MSG_CHECKING([for gcc version])
+  if test "x$GCC" = "xyes"
+  then
+	$CC -dumpversion >/dev/null 2>&1
+	if test $? -eq 0
+	then
+		GCC_VERSION=`$CC -dumpversion`
+      		gcc_VERSION_MAJOR=`echo $GCC_VERSION | cut -d'.' -f1`
+      		gcc_VERSION_MINOR=`echo $GCC_VERSION | cut -d'.' -f2`
+      		AC_DEFINE_UNQUOTED(GCC_VERSION_MAJOR, [${gcc_VERSION_MAJOR}], [gcc version major])
+      		AC_DEFINE_UNQUOTED(GCC_VERSION_MINOR, [${gcc_VERSION_MINOR}], [gcc version minor])
+		AC_MSG_RESULT([$GCC_VERSION])
+	else
+		AC_MSG_RESULT([$CC -dumpversion working])
+	fi
+  else
+	AC_MSG_RESULT([compiler is not gcc])
+  fi
+])
 
 
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 439)
+++ /trunk/configure.ac	(revision 440)
@@ -34,4 +34,8 @@
 AC_SUBST(cmd_hostname)
 AC_SUBST(BUILD_CC)
+
+if test "x$GCC" = "xyes"; then
+   SH_GCC_VERSION
+fi
 
 AC_HEADER_STDC
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 439)
+++ /trunk/docs/Changelog	(revision 440)
@@ -2,4 +2,8 @@
 	* Add check to detect availability of pmap_getmaps() (missing in static library
 	  on recent Linux systems as reported by Ian Baldwin)
+	* Fixes for Ubuntu 13.4:
+		- no error msg for failing stat on /run/user/Username/gvfs in suidcheck
+		- no error message for failing hardlink check on /run/user/Username
+		- eliminate compiler warnings
 
 3.0.13:
Index: /trunk/src/rijndael-alg-fst.c
===================================================================
--- /trunk/src/rijndael-alg-fst.c	(revision 439)
+++ /trunk/src/rijndael-alg-fst.c	(revision 440)
@@ -22,4 +22,10 @@
 
 #include "rijndael-boxes-fst.h"
+
+#if defined(GCC_VERSION_MAJOR)
+#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 4))
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+#endif
 
 int rijndaelKeySched(word8 k[MAXKC][4], word8 W[MAXROUNDS+1][4][4], int ROUNDS) {
Index: /trunk/src/sh_error.c
===================================================================
--- /trunk/src/sh_error.c	(revision 439)
+++ /trunk/src/sh_error.c	(revision 440)
@@ -882,5 +882,5 @@
 SH_MUTEX_RECURSIVE(mutex_err_handle);
 
-void sh_error_handle (int sev, const char * file, long line, 
+void sh_error_handle (int sev1, const char * file, long line, 
 		      long status, unsigned long msg_id, ...)
 {
@@ -891,4 +891,5 @@
   unsigned int class;
   char * fmt;
+  volatile int sev = sev1;            /* Avoids the 'clobbered by longjmp' warning. */
 
   int    flag_inet;
Index: /trunk/src/sh_extern.c
===================================================================
--- /trunk/src/sh_extern.c	(revision 439)
+++ /trunk/src/sh_extern.c	(revision 440)
@@ -318,6 +318,9 @@
 	      memset(skey, 0, sizeof(sh_key_t));
 
-	      (void) setgid((gid_t) task->run_user_gid);
-	      (void) setuid((uid_t) task->run_user_uid);
+	      if (setgid((gid_t) task->run_user_gid) != 0)
+		_exit(EXIT_FAILURE);
+	      if (setuid((uid_t) task->run_user_uid) != 0)
+		_exit(EXIT_FAILURE);
+
 	      /* make sure we cannot get root again
 	       */
Index: /trunk/src/sh_files.c
===================================================================
--- /trunk/src/sh_files.c	(revision 439)
+++ /trunk/src/sh_files.c	(revision 440)
@@ -1887,4 +1887,12 @@
       tmp = tmp->next;
     }
+#ifdef HAVE_FNMATCH_H
+  if ( (offset == 1) && (0 == fnmatch(_("/run/user/*"), path, FNM_PATHNAME)) )
+    {
+      /* gvfs directory in /run/user/username/ */
+      SL_RETURN(0, _("sh_files_hle_test"));
+    }
+#endif
+
   SL_RETURN(-1, _("sh_files_hle_test"));
 }
Index: /trunk/src/sh_suidchk.c
===================================================================
--- /trunk/src/sh_suidchk.c	(revision 439)
+++ /trunk/src/sh_suidchk.c	(revision 440)
@@ -2285,6 +2285,10 @@
 	      volatile int  elevel = SH_ERR_ERR;
 	      size_t tlen = strlen(mnt->mnt_dir);
+
 	      if (tlen >= 6 && 0 == strcmp(&((mnt->mnt_dir)[tlen-6]), _("/.gvfs")))
 		elevel = SH_ERR_NOTICE;
+	      else if (tlen >= 5 && 0 == strcmp(&((mnt->mnt_dir)[tlen-5]), _("/gvfs")))
+		elevel = SH_ERR_NOTICE;
+
 	      sl_snprintf(errmsg, sizeof(errmsg), _("stat(%s) failed"),
 			  mnt->mnt_dir);
Index: /trunk/src/sh_tiger0.c
===================================================================
--- /trunk/src/sh_tiger0.c	(revision 439)
+++ /trunk/src/sh_tiger0.c	(revision 440)
@@ -560,4 +560,5 @@
   md5_uint32 bytes = ctx->buflen;
   size_t pad;
+  md5_uint32 temp;
 
   /* Now count remaining bytes.  */
@@ -570,7 +571,8 @@
 
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
-  *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
-  *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
-    SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+  temp = SWAP(ctx->total[0] << 3);
+  memcpy(&(ctx->buffer[bytes + pad]), &temp, sizeof(temp));
+  temp = SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+  memcpy(&(ctx->buffer[bytes + pad + 4]), &temp, sizeof(temp));
 
   /* Process last bytes.  */
Index: /trunk/src/sh_tiger1_64.c
===================================================================
--- /trunk/src/sh_tiger1_64.c	(revision 439)
+++ /trunk/src/sh_tiger1_64.c	(revision 440)
@@ -409,4 +409,8 @@
   register word64 j = 0;
   unsigned char temp[64];
+  union {
+    word64 itmp;
+    unsigned char ctmp[8];
+  } uu;
 
   /*
@@ -469,5 +473,10 @@
 #endif
 
-  ((word64*)(&(temp[56])))[0] = ((word64)length)<<3;
+  /* Avoid gcc warning for type-punned pointer 
+   */
+  uu.itmp = ((word64)length)<<3;
+  for (j=0; j<8; j++)
+        temp[56+j] = uu.ctmp[j];
+
   tiger_compress(((word64*)temp), res);
 }
