Changeset 440 for trunk/src


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

Fix for ticket #344 (Problems with Ubuntu 13.04)

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • 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.