Integrate 0.9.3 SLP/IP, SQLite identities and complete token fix; build release 0.9.3-1

This commit is contained in:
2026-11-30 06:07:09 +00:00
parent 679dada6ec
commit b9fe2e61d2
67 changed files with 1797 additions and 73 deletions

17
native/identity.h Normal file
View File

@@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef MARS_IDENTITY_H
#define MARS_IDENTITY_H
#include <sqlite3.h>
#ifndef MARS_ID_DB
#define MARS_ID_DB "/var/lib/mars-identities/identities.sqlite3"
#endif
#define MARS_UID_FIRST 200000000
#define MARS_UID_LAST 200099999
struct mars_identity { int uid; char alias[20]; char name[48]; };
/* 0 success, 1 absent, -1 error. No password material in this database. */
int mars_id_lookup(const char *alias,int uid,struct mars_identity *out);
int mars_id_reserve(const char *name,struct mars_identity *out);
int mars_id_open(sqlite3 **db,int write);
int mars_id_collision(const struct mars_identity *r);
int mars_id_name_valid(const char *name);
#endif