forked from pool/util-linux
56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
|
--- util-linux-2.12q/mount/lomount.c
|
||
|
+++ util-linux-2.12q/mount/lomount.c
|
||
|
@@ -73,6 +73,7 @@
|
||
|
#if !defined(LOOP_PASSWORD_MIN_LENGTH)
|
||
|
# define LOOP_PASSWORD_MIN_LENGTH 20
|
||
|
#endif
|
||
|
+#define SUSE_PASSWORD_MIN_LENGTH 8
|
||
|
|
||
|
char *passFDnumber = (char *)0;
|
||
|
char *passAskTwice = (char *)0;
|
||
|
@@ -459,7 +460,7 @@
|
||
|
multiKeyPass[0] = 0;
|
||
|
break;
|
||
|
}
|
||
|
- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break;
|
||
|
+ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break;
|
||
|
x++;
|
||
|
}
|
||
|
if(x == 65)
|
||
|
@@ -498,7 +499,7 @@
|
||
|
while(x < 65) {
|
||
|
multiKeyPass[x] = get_FD_pass(i);
|
||
|
if(!multiKeyPass[x]) goto nomem;
|
||
|
- if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break;
|
||
|
+ if(strlen(multiKeyPass[x]) < SUSE_PASSWORD_MIN_LENGTH) break;
|
||
|
x++;
|
||
|
}
|
||
|
if(x == 65) {
|
||
|
@@ -579,7 +580,7 @@
|
||
|
memset(p, 0, i);
|
||
|
}
|
||
|
if(i < warnLen) {
|
||
|
- fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH);
|
||
|
+ fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), SUSE_PASSWORD_MIN_LENGTH);
|
||
|
}
|
||
|
strcat(s, seed);
|
||
|
return(s);
|
||
|
@@ -785,7 +786,7 @@
|
||
|
char *pass, *apiName = NULL;
|
||
|
void (*hashFunc)(unsigned char *, int, unsigned char *, int) = NULL;
|
||
|
unsigned char multiKeyBits[65][32];
|
||
|
- int minPassLen = LOOP_PASSWORD_MIN_LENGTH;
|
||
|
+ int minPassLen = SUSE_PASSWORD_MIN_LENGTH;
|
||
|
int run_mkfs_command = 0;
|
||
|
|
||
|
loopFileName = (char *)file;
|
||
|
@@ -900,7 +901,7 @@
|
||
|
break; /* out of switch(loopinfo.lo_encrypt_type) */
|
||
|
}
|
||
|
}
|
||
|
- pass = sGetPass (minPassLen, LOOP_PASSWORD_MIN_LENGTH);
|
||
|
+ pass = sGetPass (minPassLen, SUSE_PASSWORD_MIN_LENGTH);
|
||
|
if(!pass) goto close_fd_ffd_return1;
|
||
|
i = strlen(pass);
|
||
|
if(hashFunc == unhashed1_key_setup) {
|