This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh -e | |
| # save the original LD_LIBRARY_PATH, and unset it to check the cache | |
| ORIGINAL_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" | |
| LD_LIBRARY_PATH="" | |
| export LD_LIBRARY_PATH | |
| # FINAL_BINARY should be set and exported to what the "real" final executable | |
| # that's run is so we can check that | |
| # an alternative would be to always run the "real" final executable immediately |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -ex | |
| # make sure our fake ld.so.cache exists | |
| if [ ! -f "$SNAP_DATA/etc/ld.so.cache" ]; then | |
| echo "snap private ld.so.cache doesn't exist!" | |
| exit 1 | |
| fi | |
| # copying the conf dir from real /etc into $SNAP_DATA | |
| mkdir -p "$SNAP_DATA/etc/ld.so.conf.d" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "ExecvePaths": { | |
| "AllFiles": [ | |
| "/snap/gnome-calculator/current", | |
| "/snap/gnome-calculator/x1", | |
| "/snap/gnome-calculator/x1/data-dir", | |
| "/snap/gnome-calculator/x1/data-dir/icons", | |
| "/snap/gnome-calculator/x1/data-dir/icons/Adwaita", | |
| "/snap/gnome-calculator/x1/data-dir/icons/Adwaita/16x16/devices", | |
| "/snap/gnome-calculator/x1/data-dir/icons/Adwaita/16x16/emblems", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config: {} | |
| networks: | |
| - config: | |
| ipv4.address: auto | |
| ipv6.address: auto | |
| description: "" | |
| name: lxdbr0 | |
| type: "" | |
| storage_pools: | |
| - config: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func mockRealSystemdMountInBash(c *C, expArgs [][]string) *testutil.MockCmd { | |
| stateCallFile := filepath.Join(c.MkDir(), "systemd-mount-state-call") | |
| template := fmt.Sprintf(` | |
| STATE_FILE=%s | |
| if [ ! -f "$STATE_FILE" ]; then | |
| CALL_NUM=0 | |
| else | |
| CALL_NUM=$(cat "$STATE_FILE") | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func hashMapAndBool(b bool, m map[string]string) string { | |
| h := sha256.New() | |
| // hashing maps is not deterministic because it is not sorted, so we have | |
| // to manually hash each key value into another hash after sorting | |
| // first we hash the string representation of the bool | |
| h.Write([]byte(fmt.Sprintf("%v", b))) | |
| keys := make([]string, len(m)) | |
| i := 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # first argument is the name of the key to sign the assertion with | |
| if [ "$#" != 1 ]; then | |
| echo "usage: ./sign-system-user-assertion <key-name>" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -*- Mode: Go; indent-tabs-mode: t -*- | |
| /* | |
| * Copyright (C) 2020 Canonical Ltd | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 3 as | |
| * published by the Free Software Foundation. | |
| * | |
| * This program is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -*- Mode: Go; indent-tabs-mode: t -*- | |
| /* | |
| * Copyright (C) 2021 Canonical Ltd | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 3 as | |
| * published by the Free Software Foundation. | |
| * | |
| * This program is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -*- Mode: Go; indent-tabs-mode: t -*- | |
| /* | |
| * Copyright (C) 2021 Canonical Ltd | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 3 as | |
| * published by the Free Software Foundation. | |
| * | |
| * This program is distributed in the hope that it will be useful, |