Diffstat (limited to 'noncore/comm/keypebble/vncauth.c') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/vncauth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/comm/keypebble/vncauth.c b/noncore/comm/keypebble/vncauth.c index dc276bf..277d145 100644 --- a/noncore/comm/keypebble/vncauth.c +++ b/noncore/comm/keypebble/vncauth.c | |||
@@ -40,25 +40,25 @@ | |||
40 | unsigned char fixedkey[8] = {23,82,107,6,35,78,88,7}; | 40 | unsigned char fixedkey[8] = {23,82,107,6,35,78,88,7}; |
41 | 41 | ||
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Encrypt a password and store it in a file. Returns 0 if successful, | 44 | * Encrypt a password and store it in a file. Returns 0 if successful, |
45 | * 1 if the file could not be written. | 45 | * 1 if the file could not be written. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | int | 48 | int |
49 | vncEncryptAndStorePasswd(char *passwd, char *fname) | 49 | vncEncryptAndStorePasswd(char *passwd, char *fname) |
50 | { | 50 | { |
51 | FILE *fp; | 51 | FILE *fp; |
52 | int i; | 52 | uint i; |
53 | unsigned char encryptedPasswd[8]; | 53 | unsigned char encryptedPasswd[8]; |
54 | 54 | ||
55 | if ((fp = fopen(fname,"w")) == NULL) return 1; | 55 | if ((fp = fopen(fname,"w")) == NULL) return 1; |
56 | 56 | ||
57 | chmod(fname, S_IRUSR|S_IWUSR); | 57 | chmod(fname, S_IRUSR|S_IWUSR); |
58 | 58 | ||
59 | /* pad password with nulls */ | 59 | /* pad password with nulls */ |
60 | 60 | ||
61 | for (i = 0; i < 8; i++) { | 61 | for (i = 0; i < 8; i++) { |
62 | if (i < strlen(passwd)) { | 62 | if (i < strlen(passwd)) { |
63 | encryptedPasswd[i] = passwd[i]; | 63 | encryptedPasswd[i] = passwd[i]; |
64 | } else { | 64 | } else { |