diff -durN samba.old/source/lib/util_str.c samba/source/lib/util_str.c --- samba.old/source/lib/util_str.c 2004-05-11 08:19:38.000000000 +0400 +++ samba/source/lib/util_str.c 2004-06-02 16:49:28.000000000 +0400 @@ -1408,11 +1408,14 @@ /* I assume that lowercased string takes the same number of bytes * as source string even in UTF-8 encoding. (VIV) */ len = strlen(s) + 1; + + int errnosave = errno; errno = 0; unix_strlower(s,len,s,len); /* Catch mb conversion errors that may not terminate. */ if (errno) s[len-1] = '\0'; + errno = errnosave; } /**