pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2011-06-29
2011-06-29 12:35:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>
87626952a0cfdb0e3ac69c203c95241b697c8c8e (
20
lines) (+
19
/-
1
)
[
Show
|
Annotate
]
Branch:
7.8
Survive crypt(3C) failing. Fixes [bug
6013 (#6013)
].
2910:
return; } } else {
-
unsigned int foo; /* Sun CC
want's
this :( */
+
unsigned int foo; /* Sun CC
wants
this :( */
foo=my_rand(); salt[0] = choise[foo % (size_t) strlen(choise)]; foo=my_rand();
2926:
#error No crypt function found and fallback failed. #endif #endif
+
if (!ret) {
+
switch(errno) {
+
#ifdef ELIBACC
+
case ELIBACC:
+
Pike_error("Failed to load a required shared library. "
+
"Unsupported salt.\n");
+
break;
+
#endif
+
case ENOMEM:
+
Pike_error("Out of memory.\n");
+
break;
+
case EINVAL:
+
default:
+
Pike_error("Unsupported salt (%d).\n", errno);
+
break;
+
}
+
}
if(args < 2) { pop_n_elems(args);