- static char *optstr = NULL;
- char *compress_opt;
- char *encrypt_opt;
- char *decrypt_opt;
- char *record_opt = "";
- char *index_opt = "";
- char *auth_opt;
- char *exclude_file_opt;
- char *exclude_list_opt;
- char *exc = NULL;
- sle_t *excl;
-
- if(options->compress == COMP_BEST)
- compress_opt = stralloc("compress-best;");
- else if(options->compress == COMP_FAST)
- compress_opt = stralloc("compress-fast;");
- else if(options->compress == COMP_SERVER_BEST)
- compress_opt = stralloc("srvcomp-best;");
- else if(options->compress == COMP_SERVER_FAST)
- compress_opt = stralloc("srvcomp-fast;");
- else if(options->compress == COMP_SERVER_CUST)
- compress_opt = vstralloc("srvcomp-cust=", options->srvcompprog, ";", NULL);
- else if(options->compress == COMP_CUST)
- compress_opt = vstralloc("comp-cust=", options->clntcompprog, ";", NULL);
- else
- compress_opt = stralloc("");
-
- if(options->encrypt == ENCRYPT_CUST) {
- encrypt_opt = vstralloc("encrypt-cust=", options->clnt_encrypt, ";", NULL);
- if (options->clnt_decrypt_opt)
- decrypt_opt = vstralloc("client-decrypt-option=", options->clnt_decrypt_opt, ";", NULL);
- else
- decrypt_opt = stralloc("");
- }
- else if(options->encrypt == ENCRYPT_SERV_CUST) {
- encrypt_opt = vstralloc("encrypt-serv-cust=", options->srv_encrypt, ";", NULL);
- if(options->srv_decrypt_opt)
- decrypt_opt = vstralloc("server-decrypt-option=", options->srv_decrypt_opt, ";", NULL);
- else
- decrypt_opt = stralloc("");
- }
- else {
- encrypt_opt = stralloc("");
- decrypt_opt = stralloc("");
- }