~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to src/namespace.c

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
        }
254
254
 
255
255
        if (need_private) {
 
256
                mode_t u;
 
257
 
256
258
                memcpy(private_dir, tmp_dir, sizeof(tmp_dir)-1);
 
259
 
 
260
                u = umask(0000);
257
261
                if (mkdir(private_dir, 0777 + S_ISVTX) < 0) {
 
262
                        umask(u);
 
263
 
258
264
                        r = -errno;
259
265
                        goto fail;
260
266
                }
 
267
 
 
268
                umask(u);
261
269
                remove_private = true;
262
270
        }
263
271
 
266
274
                goto fail;
267
275
        }
268
276
 
269
 
        /* We assume that by default mount events from us won't be
270
 
         * propagated to the root namespace. */
 
277
        /* Remount / as SLAVE so that nothing mounted in the namespace
 
278
           shows up in the parent */
 
279
        if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL) < 0) {
 
280
                r = -errno;
 
281
                goto fail;
 
282
        }
271
283
 
272
284
        for (p = paths; p < paths + n; p++)
273
285
                if ((r = apply_mount(p, root_dir, inaccessible_dir, private_dir, flags)) < 0)