textclient: don't try to stat citadel.config; it doesn't exist anymore.
authorArt Cancro <ajc@citadel.org>
Fri, 13 May 2016 14:22:17 +0000 (10:22 -0400)
committerArt Cancro <ajc@citadel.org>
Fri, 13 May 2016 14:24:16 +0000 (10:24 -0400)
Conflicts:
webcit/webcit.h

textclient/src/citadel.c
textclient/src/citadel_ipc.c
webcit/webcit.h

index 9e6fc86c29c4cadac4aa40e45c2562c1301afec4..52765a76b4a20870a0a37e898f51a3b30fcbcca4 100644 (file)
@@ -1426,15 +1426,6 @@ int main(int argc, char **argv)
        setIPCErrorPrintf(scr_printf);
        setCryptoStatusHook(statusHook);
        
-       /* Permissions sanity check - don't run citadel setuid/setgid */
-       if (getuid() != geteuid()) {
-               scr_printf("Please do not run citadel setuid!\n");
-               logoff(NULL, 3);
-       } else if (getgid() != getegid()) {
-               scr_printf("Please do not run citadel setgid!\n");
-               logoff(NULL, 3);
-       }
-
        stty_ctdl(SB_SAVE);             /* Store the old terminal parameters */
        load_command_set();             /* parse the citadel.rc file */
        stty_ctdl(SB_NO_INTR);          /* Install the new ones */
@@ -1473,42 +1464,8 @@ int main(int argc, char **argv)
                        return 1;
 #endif
                }
-               if (!strcmp(argv[a], "-p")) {
-                       struct stat st;
-               
-                       if (chdir(CTDLDIR) < 0) {
-                               perror("can't change to " CTDLDIR);
-                               logoff(NULL, 3);
-                       }
-
-                       /*
-                        * Drop privileges if necessary. We stat
-                        * citadel.config to get the uid/gid since it's
-                        * guaranteed to have the uid/gid we want.
-                        */
-                       if (!getuid() || !getgid()) {
-                               if (stat(file_citadel_config, &st) < 0) {
-                                       perror("couldn't stat citadel.config");
-                                       logoff(NULL, 3);
-                               }
-                               if (!getgid() && (setgid(st.st_gid) < 0)) {
-                                       perror("couldn't change gid");
-                                       logoff(NULL, 3);
-                               }
-                               if (!getuid() && (setuid(st.st_uid) < 0)) {
-                                       perror("couldn't change uid");
-                                       logoff(NULL, 3);
-                               }
-                               /*
-                                 scr_printf("Privileges changed to uid %d gid %d\n",
-                                 getuid(), getgid());
-                               */
-                       }
-                       argc = shift(argc, argv, a, 1);
-               }
        }
        
-
        screen_new();
        /* Get screen dimensions.  First we go to a default of 80x24.
         * Then attempt to read the actual screen size from the terminal.
index 1225bf9877a3bd87a106e0af2dfd3b1a43ae8b7a..1992ee8eb81b6f694f8a10698be3a57345d5aa5f 100644 (file)
@@ -66,8 +66,6 @@ char ctdl_run_dir[PATH_MAX]="";
 char ctdl_etc_dir[PATH_MAX]="";
 char ctdl_home_directory[PATH_MAX] = "";
 char file_citadel_socket[PATH_MAX]="";
-char file_citadel_config[PATH_MAX]="";
-
 
 char *viewdefs[]={
         "Messages",
@@ -178,12 +176,6 @@ void calc_dirs_n_files(int relh, int home, const char *relhome, char  *ctdldir,
                         ctdl_run_dir);
        StripSlashes(file_citadel_socket, 0);
 
-       snprintf(file_citadel_config, 
-                        sizeof file_citadel_config,
-                        "%scitadel.config",
-                        ctdl_autoetc_dir);
-       StripSlashes(file_citadel_config, 0);
-
        DBG_PRINT(ctdl_run_dir);
        DBG_PRINT(file_citadel_socket);
        DBG_PRINT(ctdl_etc_dir);
index d8fa7089bed378675a832709a43500510a72d24d..d1ec72686044489c0d492380762c02c9ed44fae2 100644 (file)
@@ -321,6 +321,7 @@ enum {
        eNone
 };
 
+<<<<<<< HEAD
 enum {
        eGET,
        ePOST,
@@ -727,3 +728,15 @@ void display_summary_page(void);
 
 HashList *GetValidDomainNames(StrBuf *Target, WCTemplputParams *TP);
 void output_error_pic(const char *ErrMsg1, const char *ErrMsg2);
+=======
+#define TRACE syslog(LOG_DEBUG, "\033[3%dmCHECKPOINT: %s:%d\033[0m", ((__LINE__%6)+1), __FILE__, __LINE__)
+#define SLEEPING               180             // TCP connection timeout
+#define MAX_WORKER_THREADS     32              // Maximum number of worker threads permitted to exist
+
+int webserver(char *webserver_interface, int webserver_port, int webserver_protocol);
+int webcit_tcp_server(const char *ip_addr, int port_number, int queue_len);
+int webcit_uds_server(char *sockpath, int queue_len);
+int lingering_close(int fd);
+void perform_one_http_transaction(int ssock);
+void worker_entry(int *pointer_to_master_socket);
+>>>>>>> af64ffb... textclient: don't try to stat citadel.config; it doesn't exist anymore.