Index: zcrypt.c
===================================================================
--- zcrypt.c	(revision 6d7f2a891abab0094ff8f0a77f7c44a6bcd017a5)
+++ zcrypt.c	(revision e832a52bbcd4f2a74be276d35bb4d891c9ca4879)
@@ -52,17 +52,17 @@
 } ZWRITEOPTIONS;
 
-char *GetZephyrVarKeyFile(char *whoami, char *class, char *instance);
-int ParseCryptSpec(char *spec, char **keyfile);
+char *GetZephyrVarKeyFile(const char *whoami, const char *class, const char *instance);
+int ParseCryptSpec(const char *spec, const char **keyfile);
 char *BuildArgString(char **argv, int start, int end);
-char *read_keystring(char *keyfile);
-
-int do_encrypt(int zephyr, char *class, char *instance,
-               ZWRITEOPTIONS *zoptions, char* keyfile, int cipher);
-int do_encrypt_des(char *keyfile, char *in, int len, FILE *out);
-int do_encrypt_aes(char *keyfile, char *in, int len, FILE *out);
-
-int do_decrypt(char *keyfile, int cipher);
-int do_decrypt_aes(char *keyfile);
-int do_decrypt_des(char *keyfile);
+char *read_keystring(const char *keyfile);
+
+int do_encrypt(int zephyr, const char *class, const char *instance,
+               ZWRITEOPTIONS *zoptions, const char* keyfile, int cipher);
+int do_encrypt_des(const char *keyfile, const char *in, int len, FILE *out);
+int do_encrypt_aes(const char *keyfile, const char *in, int len, FILE *out);
+
+int do_decrypt(const char *keyfile, int cipher);
+int do_decrypt_aes(const char *keyfile);
+int do_decrypt_des(const char *keyfile);
 
 
@@ -81,6 +81,6 @@
 
 typedef struct {
-  int (*encrypt)(char *keyfile, char *in, int len, FILE *out);
-  int (*decrypt)(char *keyfile);
+  int (*encrypt)(const char *keyfile, const char *in, int len, FILE *out);
+  int (*decrypt)(const char *keyfile);
 } cipher_pair;
 
@@ -104,5 +104,5 @@
 {
   char *cryptspec = NULL;
-  char *keyfile;
+  const char *keyfile;
   int cipher;
   int error = FALSE;
@@ -333,5 +333,5 @@
 }
 
-int ParseCryptSpec(char *spec, char **keyfile) {
+int ParseCryptSpec(const char *spec, const char **keyfile) {
   int cipher = CIPHER_DES;
   char *cipher_name = strdup(spec);
@@ -402,5 +402,5 @@
 #define MAX_SEARCH 3
 /* Find the class/instance in the .crypt-table */
-char *GetZephyrVarKeyFile(char *whoami, char *class, char *instance)
+char *GetZephyrVarKeyFile(const char *whoami, const char *class, const char *instance)
 {
   char *keyfile = NULL;
@@ -491,10 +491,10 @@
 
 /* Open a pipe to zwrite */
-FILE *GetZephyrPipe(char *class, char *instance, ZWRITEOPTIONS *zoptions)
+FILE *GetZephyrPipe(const char *class, const char *instance, const ZWRITEOPTIONS *zoptions)
 {
   int fildes[2];
   pid_t pid;
   FILE *result;
-  char *argv[20];
+  const char *argv[20];
   int argc = 0;
 
@@ -547,5 +547,5 @@
     }
     close(fildes[0]);
-    execvp(argv[0], argv);
+    execvp(argv[0], (char **)argv);
     fprintf(stderr, "Exec error: could not run zwrite\n");
     exit(0);
@@ -642,5 +642,5 @@
 }
 
-char *read_keystring(char *keyfile) {
+char *read_keystring(const char *keyfile) {
   char *keystring;
   FILE *fkey = fopen(keyfile, "r");
@@ -661,6 +661,6 @@
 /* Encrypt stdin, with prompt if isatty, and send to stdout, or to zwrite
    if zephyr is set. */
-int do_encrypt(int zephyr, char *class, char *instance,
-               ZWRITEOPTIONS *zoptions, char* keyfile, int cipher)
+int do_encrypt(int zephyr, const char *class, const char *instance,
+               ZWRITEOPTIONS *zoptions, const char *keyfile, int cipher)
 {
   FILE *outfile = stdout;
@@ -696,9 +696,9 @@
 }
 
-int do_encrypt_des(char *keyfile, char *in, int length, FILE *outfile)
+int do_encrypt_des(const char *keyfile, const char *in, int length, FILE *outfile)
 {
   des_key_schedule schedule;
   unsigned char input[8], output[8];
-  char *inptr;
+  const char *inptr;
   int num_blocks, last_block_size;
   char *keystring;
@@ -756,5 +756,5 @@
 }
 
-int do_encrypt_aes(char *keyfile, char *in, int length, FILE *outfile)
+int do_encrypt_aes(const char *keyfile, const char *in, int length, FILE *outfile)
 {
   char *out;
@@ -832,10 +832,10 @@
 
 /* Decrypt stdin */
-int do_decrypt(char *keyfile, int cipher)
+int do_decrypt(const char *keyfile, int cipher)
 {
   return ciphers[cipher].decrypt(keyfile);
 }
 
-int do_decrypt_aes(char *keyfile) {
+int do_decrypt_aes(const char *keyfile) {
   char *in, *out;
   int length;
@@ -865,5 +865,5 @@
 }
 
-int do_decrypt_des(char *keyfile) {
+int do_decrypt_des(const char *keyfile) {
   des_key_schedule schedule;
   unsigned char input[8], output[8];
