OstreeSePolicy: add ostree_sepolicy_get_csum()
This can be used as a fingerprint to determine whether two OstreeSePolicy objects are equivalent. Also add documentation for ostree_sepolicy_get_name(). Closes: #219 Approved by: cgwalters
This commit is contained in:
1 parent
456f515522
commit
b7a04d51f8
5 files changed
+132
-10
No files matched your search
@@ -140,17 +140,17 @@ ot_gio_checksum_stream (GInputStream *in,
|
||||
}
|
||||
|
||||
char *
|
||||
ot_checksum_file (GFile *file,
|
||||
GChecksumType checksum_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
ot_checksum_file_at (int dfd,
|
||||
const char *path,
|
||||
GChecksumType checksum_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GChecksum *checksum = NULL;
|
||||
char *ret = NULL;
|
||||
g_autoptr(GInputStream) in = NULL;
|
||||
|
||||
in = (GInputStream*)g_file_read (file, cancellable, error);
|
||||
if (!in)
|
||||
if (!ot_openat_read_stream (dfd, path, TRUE, &in, cancellable, error))
|
||||
goto out;
|
||||
|
||||
checksum = g_checksum_new (checksum_type);
|
||||
|
||||
@@ -53,10 +53,11 @@ gboolean ot_gio_checksum_stream (GInputStream *in,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
char * ot_checksum_file (GFile *file,
|
||||
GChecksumType checksum_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
char * ot_checksum_file_at (int dfd,
|
||||
const char *path,
|
||||
GChecksumType checksum_type,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
void ot_gio_checksum_stream_async (GInputStream *in,
|
||||
int io_priority,
|
||||
|
||||
Reference in new issue
Block a user