#include "ctdl_module.h"
#include "threads.h"
+#include "user_ops.h"
+
#ifdef DEBUG_MEMORY_LEAKS
struct igheap {
return nptr;
}
+
+
+/**
+ * This function returns a private context with the user filled in correctly
+ */
+void CtdlFillPrivateContext(struct CitContext *context, char *name)
+{
+ char sysname[USERNAME_SIZE];
+
+ memset(context, 0, sizeof(struct CitContext));
+ context->internal_pgm = 1;
+ context->cs_pid = 0;
+ strcpy (sysname, "SYS_");
+ strcat (sysname, name);
+ if (getuser(&(context->user), sysname))
+ {
+ strcpy(context->user.fullname, sysname);
+ putuser(&(context->user));
+ }
+}
+
/*
* The following functions implement output buffering. If the kernel supplies
* native TCP buffering (Linux & *BSD), use that; otherwise, emulate it with