Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2012 02:22:57 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r898 - in branches/experimental/www/firefox-nightly: . files
Message-ID:  <201207290222.q6T2MvgY024681@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Jul 29 02:22:57 2012
New Revision: 898

Log:
update Nightly

Deleted:
   branches/experimental/www/firefox-nightly/files/patch-memory-mozalloc-mozalloc.cpp
Modified:
   branches/experimental/www/firefox-nightly/Makefile.hgrev
   branches/experimental/www/firefox-nightly/distinfo
   branches/experimental/www/firefox-nightly/files/patch-bug753046

Modified: branches/experimental/www/firefox-nightly/Makefile.hgrev
==============================================================================
--- branches/experimental/www/firefox-nightly/Makefile.hgrev	Thu Jul 26 14:10:34 2012	(r897)
+++ branches/experimental/www/firefox-nightly/Makefile.hgrev	Sun Jul 29 02:22:57 2012	(r898)
@@ -1 +1 @@
-HGREV=		100555:20db7c6d82cc
+HGREV=		100823:29bff59d3bbe

Modified: branches/experimental/www/firefox-nightly/distinfo
==============================================================================
--- branches/experimental/www/firefox-nightly/distinfo	Thu Jul 26 14:10:34 2012	(r897)
+++ branches/experimental/www/firefox-nightly/distinfo	Sun Jul 29 02:22:57 2012	(r898)
@@ -1,2 +1,2 @@
-SHA256 (firefox-nightly/20db7c6d82cc.tar.bz2) = f8f85e301b19621455bba121b4b1b833391ea0b673e87911d023f5862487e6d0
-SIZE (firefox-nightly/20db7c6d82cc.tar.bz2) = 87495620
+SHA256 (firefox-nightly/29bff59d3bbe.tar.bz2) = 7df2790a9fb29025ac7a402105d84d462405ce9b13f8c8ecb131c7ebd9f08cd8
+SIZE (firefox-nightly/29bff59d3bbe.tar.bz2) = 87797021

Modified: branches/experimental/www/firefox-nightly/files/patch-bug753046
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-bug753046	Thu Jul 26 14:10:34 2012	(r897)
+++ branches/experimental/www/firefox-nightly/files/patch-bug753046	Sun Jul 29 02:22:57 2012	(r898)
@@ -663,7 +663,7 @@
 
 --- ipc/chromium/src/base/process_util_bsd.cc.orig	2012-04-01 00:04:28.000000000 +0000
 +++ ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,369 @@
 +// Copyright (c) 2008 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -709,6 +709,14 @@
 +#include "base/string_tokenizer.h"
 +#include "base/string_util.h"
 +
++/*
++ * On platforms that are not gonk based, we fall back to an arbitrary
++ * UID. This is generally the UID for user `nobody', albeit it is not
++ * always the case.
++ */
++# define CHILD_UNPRIVILEGED_UID 65534
++# define CHILD_UNPRIVILEGED_GID 65534
++
 +#if defined(OS_NETBSD)
 +#include <sys/param.h>
 +#if __NetBSD_Version__ >= 600000000
@@ -758,6 +766,17 @@
 +               const environment_map& env_vars_to_set,
 +               bool wait, ProcessHandle* process_handle,
 +               ProcessArchitecture arch) {
++  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++                   SAME_PRIVILEGES_AS_PARENT,
++                   wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++               const file_handle_mapping_vector& fds_to_remap,
++               const environment_map& env_vars_to_set,
++               ChildPrivileges privs,
++               bool wait, ProcessHandle* process_handle,
++               ProcessArchitecture arch) {
 +  bool retval = true;
 +
 +  char* argv_copy[argv.size() + 1];
@@ -872,6 +891,17 @@
 +               const environment_map& env_vars_to_set,
 +               bool wait, ProcessHandle* process_handle,
 +               ProcessArchitecture arch) {
++  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++                   SAME_PRIVILEGES_AS_PARENT,
++                   wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++               const file_handle_mapping_vector& fds_to_remap,
++               const environment_map& env_vars_to_set,
++               ChildPrivileges privs,
++               bool wait, ProcessHandle* process_handle,
++               ProcessArchitecture arch) {
 +  scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
 +  // Illegal to allocate memory after fork and before execvp
 +  InjectiveMultimap fd_shuffle1, fd_shuffle2;
@@ -894,19 +924,32 @@
 +
 +    CloseSuperfluousFds(fd_shuffle2);
 +
++    for (size_t i = 0; i < argv.size(); i++)
++      argv_cstr[i] = const_cast<char*>(argv[i].c_str());
++    argv_cstr[argv.size()] = NULL;
++
++    if (privs == UNPRIVILEGED) {
++      if (setgid(CHILD_UNPRIVILEGED_GID) != 0) {
++        DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0];
++        _exit(127);
++      }
++      if (setuid(CHILD_UNPRIVILEGED_UID) != 0) {
++        DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0];
++        _exit(127);
++      }
++      if (chdir("/") != 0)
++        gProcessLog.print("==> could not chdir()\n");
++    }
++
 +    for (environment_map::const_iterator it = env_vars_to_set.begin();
 +         it != env_vars_to_set.end(); ++it) {
 +      if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
 +        _exit(127);
 +    }
-+
-+    for (size_t i = 0; i < argv.size(); i++)
-+      argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+    argv_cstr[argv.size()] = NULL;
-+    execvp(argv_cstr[0], argv_cstr.get());
++    execv(argv_cstr[0], argv_cstr.get());
 +    // if we get here, we're in serious trouble and should complain loudly
 +    DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+    exit(127);
++    _exit(127);
 +  } else {
 +    gProcessLog.print("==> process %d launched child process %d\n",
 +                      GetCurrentProcId(), pid);
@@ -1223,7 +1266,7 @@
    base::LaunchApp(childArgv, mFileMap,
 -#if defined(OS_LINUX) || defined(OS_MACOSX)
 +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-                   newEnvVars,
+                   newEnvVars, privs,
  #endif
                    false, &process, arch);
 $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $

Deleted: branches/experimental/www/firefox-nightly/files/patch-memory-mozalloc-mozalloc.cpp
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-memory-mozalloc-mozalloc.cpp	Sun Jul 29 02:22:57 2012	(r897)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,21 +0,0 @@
---- memory/mozalloc/mozalloc.cpp~
-+++ memory/mozalloc/mozalloc.cpp
-@@ -19,6 +19,9 @@
- #if defined(XP_UNIX)
- #  include <unistd.h>           // for valloc on *BSD
- #endif //if defined(XP_UNIX)
-+#ifdef __FreeBSD__
-+#  include <malloc_np.h>        // for malloc_usable_size
-+#endif
- 
- #if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
- #  define MOZALLOC_EXPORT __declspec(dllexport)
-@@ -210,7 +213,7 @@ moz_malloc_usable_size(void *ptr)
- 
- #if defined(XP_MACOSX)
-     return malloc_size(ptr);
--#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID))
-+#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__)
-     // Android bionic libc doesn't have malloc_usable_size.
-     return malloc_usable_size(ptr);
- #elif defined(XP_WIN)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207290222.q6T2MvgY024681>