deploy: Set the immutable bit on the deployment root

This prevents people from creating new directories there and expecting
them to be persisted.  The OSTree model has all local state to be in
/etc and /var.

This introduces a compile-time dependency on libe2fsprogs.

We're only doing this for the root directory at the moment.

https://bugzilla.gnome.org/show_bug.cgi?id=728006
This commit is contained in:
Colin Walters committed 2014-06-03 13:41:48 -04:00
1 parent 93c68083ac
commit b4d21e9406
6 files changed
+182

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2014 Colin Walters <walters@verbum.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#pragma once
#include "ostree-types.h"
G_BEGIN_DECLS
gboolean
_ostree_linuxfs_fd_alter_immutable_flag (int fd,
gboolean new_immutable_state,
GCancellable *cancellable,
GError **error);
gboolean
_ostree_linuxfs_alter_immutable_flag (GFile *path,
gboolean new_immutable_state,
GCancellable *cancellable,
GError **error);
G_END_DECLS