Thanks to some warnings I received (thanks Vince), I've modified and tested the "patch over patch" made for making chkuser work together with TMDA, and made a final version that looks exempt from bugs (!).

Note: The original chkuser has no problems. Problems have been found on the extension made for TMDA.

Final code that seems to work without problems, as it has been tested, is:

                user_passwd = vauth_getpw (user.s, domain.s);
+               if (user_passwd == NULL) {
+                       count = 0;
+                       while ((count < (user.len -1)) && (user_passwd == NULL)) {
+                               count += byte_chr(&user.s[count], user.len - count,'-');
+                               if (count < user.len) {
+                                       if (!stralloc_copyb (&alias_name, user.s, count)) die_nomem();
+                                       if (!stralloc_0 (&alias_name)) die_nomem();
+                                       user_passwd = vauth_getpw (alias_name.s, domain.s);
+                                         ++count;
+                               }
+                        }
+               }
                if (user_passwd != NULL) {

Please, who has used the previous version of this "patch over patch", should update to this version of code.

Let me know of any problems, if possible.



        [EMAIL PROTECTED]            Interazioni di Antonio Nati      [EMAIL PROTECTED]          

Reply via email to