]> mj.ucw.cz Git - subauth.git/blobdiff - server/auth.c
It is now possible to change the comment of an existing token
[subauth.git] / server / auth.c
index de94eca669467a2f81250059a0b9111f910ccb06..2205c2e9e52a0ca5e5ce7d368b7b03683debb7fc 100644 (file)
@@ -303,6 +303,12 @@ static void db_parse_user(struct json_node *ju)
     }
 }
 
+void auth_change_token_comment(struct auth_token *at, const char *comment)
+{
+  xfree(at->comment);
+  at->comment = xstrdup(comment);
+}
+
 static void db_read(void)
 {
   struct fastbuf *fb = bopen_try(database_name, O_RDONLY, 65536);