<E>nter-message command in the text client now warns the user that this creates a...
[citadel.git] / citadel / user_ops.h
index e53fab445b2eeab289d89e0728b476d269c610b7..697554f13ffa61e1fcaa025965ffdd8b0d64dd3e 100644 (file)
@@ -12,11 +12,18 @@ void rebuild_usersbynumber(void);
 void session_startup (void);
 void logged_in_response(void);
 int purge_user (char *pname);
-int create_user (const char *newusername, int become_user);
+int getuserbyuid(struct ctdluser *usbuf, uid_t number);
+
+int create_user(char *newusername, int become_user, uid_t uid);
+enum {
+       CREATE_USER_DO_NOT_BECOME_USER,
+       CREATE_USER_BECOME_USER
+};
+#define NATIVE_AUTH_UID (-1)
+
 void do_login(void);
 int CtdlInvtKick(char *iuser, int op);
-void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data),
-       void *in_data);
+void ForEachUser(void (*CallBack)(struct ctdluser *EachUser, void *out_data), void *in_data);
 void ListThisUser(struct ctdluser *usbuf, void *data);
 int NewMailCount(void);
 int InitialMailCheck(void);
@@ -59,7 +66,6 @@ static INLINE long cutuserkey(char *username) {
        if (len >= USERNAME_SIZE)
        {
                syslog(LOG_INFO, "Username too long: %s", username);
-               cit_backtrace ();
                len = USERNAME_SIZE - 1; 
                username[len]='\0';
        }
@@ -77,7 +83,6 @@ static INLINE void makeuserkey(char *key, const char *username, long len) {
        if (len >= USERNAME_SIZE)
        {
                syslog(LOG_INFO, "Username too long: %s", username);
-               cit_backtrace ();
                len = USERNAME_SIZE - 1; 
        }
        for (i=0; i<=len; ++i) {