Changeset 440


Ignore:
Timestamp:
Aug 30, 2013, 9:36:58 PM (8 years ago)
Author:
katerina
Message:

Fix for ticket #344 (Problems with Ubuntu 13.04)

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/aclocal.m4

    r415 r440  
    21162116])])
    21172117
    2118 
     2118AC_DEFUN([SH_GCC_VERSION], [
     2119  GCC_VERSION=""
     2120  gcc_VERSION_MAJOR=0
     2121  gcc_VERSION_MINOR=0
     2122  AC_MSG_CHECKING([for gcc version])
     2123  if test "x$GCC" = "xyes"
     2124  then
     2125        $CC -dumpversion >/dev/null 2>&1
     2126        if test $? -eq 0
     2127        then
     2128                GCC_VERSION=`$CC -dumpversion`
     2129                gcc_VERSION_MAJOR=`echo $GCC_VERSION | cut -d'.' -f1`
     2130                gcc_VERSION_MINOR=`echo $GCC_VERSION | cut -d'.' -f2`
     2131                AC_DEFINE_UNQUOTED(GCC_VERSION_MAJOR, [${gcc_VERSION_MAJOR}], [gcc version major])
     2132                AC_DEFINE_UNQUOTED(GCC_VERSION_MINOR, [${gcc_VERSION_MINOR}], [gcc version minor])
     2133                AC_MSG_RESULT([$GCC_VERSION])
     2134        else
     2135                AC_MSG_RESULT([$CC -dumpversion working])
     2136        fi
     2137  else
     2138        AC_MSG_RESULT([compiler is not gcc])
     2139  fi
     2140])
    21192141
    21202142
  • trunk/configure.ac

    r439 r440  
    3434AC_SUBST(cmd_hostname)
    3535AC_SUBST(BUILD_CC)
     36
     37if test "x$GCC" = "xyes"; then
     38   SH_GCC_VERSION
     39fi
    3640
    3741AC_HEADER_STDC
  • trunk/docs/Changelog

    r439 r440  
    22        * Add check to detect availability of pmap_getmaps() (missing in static library
    33          on recent Linux systems as reported by Ian Baldwin)
     4        * Fixes for Ubuntu 13.4:
     5                - no error msg for failing stat on /run/user/Username/gvfs in suidcheck
     6                - no error message for failing hardlink check on /run/user/Username
     7                - eliminate compiler warnings
    48
    593.0.13:
  • trunk/src/rijndael-alg-fst.c

    r383 r440  
    2222
    2323#include "rijndael-boxes-fst.h"
     24
     25#if defined(GCC_VERSION_MAJOR)
     26#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 4))
     27#pragma GCC diagnostic ignored "-Wstrict-aliasing"
     28#endif
     29#endif
    2430
    2531int rijndaelKeySched(word8 k[MAXKC][4], word8 W[MAXROUNDS+1][4][4], int ROUNDS) {
  • trunk/src/sh_error.c

    r405 r440  
    882882SH_MUTEX_RECURSIVE(mutex_err_handle);
    883883
    884 void sh_error_handle (int sev, const char * file, long line,
     884void sh_error_handle (int sev1, const char * file, long line,
    885885                      long status, unsigned long msg_id, ...)
    886886{
     
    891891  unsigned int class;
    892892  char * fmt;
     893  volatile int sev = sev1;            /* Avoids the 'clobbered by longjmp' warning. */
    893894
    894895  int    flag_inet;
  • trunk/src/sh_extern.c

    r415 r440  
    318318              memset(skey, 0, sizeof(sh_key_t));
    319319
    320               (void) setgid((gid_t) task->run_user_gid);
    321               (void) setuid((uid_t) task->run_user_uid);
     320              if (setgid((gid_t) task->run_user_gid) != 0)
     321                _exit(EXIT_FAILURE);
     322              if (setuid((uid_t) task->run_user_uid) != 0)
     323                _exit(EXIT_FAILURE);
     324
    322325              /* make sure we cannot get root again
    323326               */
  • trunk/src/sh_files.c

    r433 r440  
    18871887      tmp = tmp->next;
    18881888    }
     1889#ifdef HAVE_FNMATCH_H
     1890  if ( (offset == 1) && (0 == fnmatch(_("/run/user/*"), path, FNM_PATHNAME)) )
     1891    {
     1892      /* gvfs directory in /run/user/username/ */
     1893      SL_RETURN(0, _("sh_files_hle_test"));
     1894    }
     1895#endif
     1896
    18891897  SL_RETURN(-1, _("sh_files_hle_test"));
    18901898}
  • trunk/src/sh_suidchk.c

    r406 r440  
    22852285              volatile int  elevel = SH_ERR_ERR;
    22862286              size_t tlen = strlen(mnt->mnt_dir);
     2287
    22872288              if (tlen >= 6 && 0 == strcmp(&((mnt->mnt_dir)[tlen-6]), _("/.gvfs")))
    22882289                elevel = SH_ERR_NOTICE;
     2290              else if (tlen >= 5 && 0 == strcmp(&((mnt->mnt_dir)[tlen-5]), _("/gvfs")))
     2291                elevel = SH_ERR_NOTICE;
     2292
    22892293              sl_snprintf(errmsg, sizeof(errmsg), _("stat(%s) failed"),
    22902294                          mnt->mnt_dir);
  • trunk/src/sh_tiger0.c

    r383 r440  
    560560  md5_uint32 bytes = ctx->buflen;
    561561  size_t pad;
     562  md5_uint32 temp;
    562563
    563564  /* Now count remaining bytes.  */
     
    570571
    571572  /* Put the 64-bit file length in *bits* at the end of the buffer.  */
    572   *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
    573   *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
    574     SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
     573  temp = SWAP(ctx->total[0] << 3);
     574  memcpy(&(ctx->buffer[bytes + pad]), &temp, sizeof(temp));
     575  temp = SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
     576  memcpy(&(ctx->buffer[bytes + pad + 4]), &temp, sizeof(temp));
    575577
    576578  /* Process last bytes.  */
  • trunk/src/sh_tiger1_64.c

    r171 r440  
    409409  register word64 j = 0;
    410410  unsigned char temp[64];
     411  union {
     412    word64 itmp;
     413    unsigned char ctmp[8];
     414  } uu;
    411415
    412416  /*
     
    469473#endif
    470474
    471   ((word64*)(&(temp[56])))[0] = ((word64)length)<<3;
     475  /* Avoid gcc warning for type-punned pointer
     476   */
     477  uu.itmp = ((word64)length)<<3;
     478  for (j=0; j<8; j++)
     479        temp[56+j] = uu.ctmp[j];
     480
    472481  tiger_compress(((word64*)temp), res);
    473482}
Note: See TracChangeset for help on using the changeset viewer.