summaryrefslogtreecommitdiff
path: root/src/ostree/ot-admin-instutil-builtin-selinux-ensure-labeled.c
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: Run clang-formatColin Walters2023-05-021-67/+44
| | | | | This is a one-time tree wide reformatting to ensure consistency going forward.
* Strip trailing whitespace on all C filesDan Nicholson2023-02-071-3/+3
| | | | | | | | My editor started following the configuration in .editorconfig and is applying this rule to many files I'm editing. Let's just get this over with and strip everything. This was done like so: git ls-files | grep '\.[ch]$' | xargs sed -ri 's/\s+$//'
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* bash-completion: Remove `admin` completionsColin Walters2018-02-271-5/+0
| | | | | | | | | | | | | | | The `admin` commandline should be considered a demo; I just added the `pin` command *mostly* so we could use it for unit tests, although I can imagine other people using it. But maintaining completions is a lot of overhead right now, let's not do it for `admin`. The other command line options that operate on repos we will definitely maintain since they're used in releng contexts. Closes: #1468 Approved by: jlebon
* ostree: provide command description in a better placeRuixin Bao2017-10-201-1/+1
| | | | | | | | | | | | | | | | | | | This is similar idea as https://github.com/projectatomic/rpm-ostree/pull/916/commits/5c0bf889155573feec108501ce849ac09a0c9567, The duplicated description is now removed, and the description of the command is now displayed beneath the Usage. For example: ostree cat -h will output the following: "Usage: ostree cat [OPTION?] COMMIT PATH... Concatenate contents of files" Closes: #1267 Approved by: cgwalters
* ostree: move flags into command struct, pass down through builtinsRuixin Bao2017-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | This is a similar approach as https://github.com/projectatomic/rpm-ostree/commit/12c34bb2491a07079c911ef26401fee939e5573c. One thing to note is when we parse the admin related functions, we still keep the old admin related flags, and added a new parameter to represent the command struct. This allows us to identify the caller of the function, making it easier for us to possibly deduplicate the subcommand handling in the future. A similar approach is done in rpm-ostree: https://github.com/projectatomic/rpm-ostree/commit/83aeb018c1012c7a43783c09b74ec71bc9c45826 This also makes it easier for us to change the prototype of the function. If we want to add something new in the future, we won't need to touch every prototype. Closes: #1267 Approved by: cgwalters
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* bin/admin: Do sysroot loading during argument parsingColin Walters2017-09-011-3/+0
| | | | | | | | | Followup from previous patch - we can now centralize the sysroot loading. Besides the obvious cleanup value, this is also prep for dropping an `ostree_sysroot_get_path()` user. Closes: #1123 Approved by: jlebon
* ostree: Add naggy comments to help keep options in syncMatthew Barnes2017-08-151-0/+5
| | | | | | | | | | /* ATTENTION: * Please remember to update the bash-completion script (bash/ostree) and * man page (man/ostree-$COMMANDNAME.xml) when changing the option list. */ Closes: #1080 Approved by: cgwalters
* tree-wide: Use g_autoptr(Ostree*)Colin Walters2017-08-031-2/+2
| | | | | | | | | | | Part of cleaning up our usage of libglnx; we want to use what's in GLib where we can. Had to change a few .c files to `#include ostree.h` early on to pick up autoptrs for the core types. Closes: #1040 Approved by: jlebon
* tree-wide: Switch to autoptr for GOptionContextColin Walters2016-12-081-3/+1
| | | | | | | | | | We were leaking in a few places that I noticed in an ASAN run. Also, this was one of the last non-autoptr cleanup sections we have in `out:` cleanup sections, making us a lot closer to a potential full-tree rewrite to `return FALSE`. Closes: #624 Approved by: jlebon
* lib: Use g_file_enumerator_iterate() if available, with fallbackColin Walters2016-06-211-2/+2
| | | | | | | | | | | | Import `gs_file_enumerator_iterate()` for the next six months or so...after RHEL 7.3 is released I'm strongly considering hard requiring 2.46 or so. Likely at some point we should figure out how to share more "glib backport" code with NetworkManager at least. Closes: #341 Approved by: jlebon
* glnx porting: Port away from gs_file_get_basename_cached()Colin Walters2016-06-021-1/+1
| | | | | | | | In some cases we use glnx_basename(), in others we already had a `GFileInfo` around with the name. Closes: #316 Approved by: jlebon
* admin: Ensure instutil commands and usage help don't grab lockColin Walters2015-05-151-1/+1
| | | | | | | | | When I was introducing the `_UNLOCKED` flag, I only audited subcommands of `ostree admin`, but I missed that `ostree admin instutil` also used the option parsing. Those are only used by Anaconda today so we can ignore them for locking purposes. Also, the usage help generation was grabbing the lock unnecessarily.
* Use g_autoptr(GPtrArray) instead of gs_unref_ptrarrayMatthew Barnes2015-05-061-2/+2
|
* Use glnx_unref_object instead of gs_unref_objectMatthew Barnes2015-05-061-2/+2
| | | | | For non-GIO object types, at least until autocleanup support for GObject based types becomes more widespread.
* Use g_autoptr() for GIO object typesMatthew Barnes2015-05-061-4/+4
| | | | | GLib 2.44 supplies all the necessary autocleanup macros for GIO types, and libglnx backports the relevant macros for ostree.
* Use g_autofree instead of gs_freeMatthew Barnes2015-05-061-2/+2
|
* Add OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSERMatthew Barnes2015-03-251-1/+1
| | | | | | | Indicates the command requires superuser privilege. Fails early with a more helpful message than would otherwise be returned by libostree. Currently all admin commands except 'status' require superuser.
* Add OstreeAdminBuiltinFlags for admin commandsMatthew Barnes2015-03-251-1/+3
| | | | Only OSTREE_ADMIN_BUILTIN_FLAG_NONE so far; does nothing.
* Refactor command-line parsingMatthew Barnes2014-11-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor command-line parsing to better utilize GOptionContext. This eliminates most of the manual parsing and global options are now shown in the help output. Here's a sample: $ ostree admin --help Usage: ostree admin [OPTION...] --print-current-dir|COMMAND Builtin "admin" Commands: cleanup config-diff deploy init-fs instutil os-init status switch undeploy upgrade Help Options: -h, --help Show help options Application Options: --sysroot=PATH Create a new OSTree sysroot at PATH -v, --verbose Print debug information during command processing --version Print version information and exit https://bugzilla.gnome.org/show_bug.cgi?id=740295
* ostree admin instutil: make --help work for subcommandsOwen W. Taylor2014-09-251-0/+14
| | | | | | | Even though the subcommands don't take arguments, use a GOptionContext so that --help works as expected. https://bugzilla.gnome.org/show_bug.cgi?id=737194
* selinux-ensure-labeled: Support no arguments to just traverse deployment rootColin Walters2014-05-221-12/+12
| | | | | | This makes it easy to use for the case where rpm-ostree-toolbox is injecting systemd services into the deployment root, and we don't actually need to traverse the whole FS.
* Add "ostree admin instutil", move selinux-ensure-labeled thereColin Walters2014-03-191-0/+231
There are going to be a few utilities that are only useful for installers and disk image creation tools. Let's not expose them all at the toplevel; instead, hide them under "instutil".