Update copyright dates
[src/app-framework-binder.git] / src / afb-cred.h
index 5bd5423..2fc8e45 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 "IoT.bzh"
+ * Copyright (C) 2015-2020 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
 
 #include <sys/types.h>
 
+struct afb_context;
+
 struct afb_cred
 {
        int refcount;
        uid_t uid;
        gid_t gid;
        pid_t pid;
+       const char *user;
        const char *label;
        const char *id;
+       const char *exported;
 };
 
 extern struct afb_cred *afb_cred_current();
@@ -35,4 +39,5 @@ extern struct afb_cred *afb_cred_create_for_socket(int fd);
 extern struct afb_cred *afb_cred_addref(struct afb_cred *cred);
 extern void afb_cred_unref(struct afb_cred *cred);
 
-
+extern const char *afb_cred_export(struct afb_cred *cred);
+extern struct afb_cred *afb_cred_import(const char *string);