netapi32: [2/5] Implement NetUserAdd with a dummy user database.
Dmitry Timoshkov
dmitry at codeweavers.com
Fri Mar 23 23:34:37 CDT 2007
"Kai Blin" <kai.blin at gmail.com> wrote:
> + if(!su)
> + {
> + status = NERR_InternalError;
> + goto user_add_error;
> + }
> +
> + if(lstrlenW(ui->usri1_name) > LM20_UNLEN)
> + {
> + status = NERR_BadUsername;
> + goto user_add_error;
> + }
> +
> + /*FIXME: do other checks for a valid username */
> + lstrcpyW(su->user_name, ui->usri1_name);
> +
> + if(lstrlenW(ui->usri1_password) > PWLEN)
> + {
> + /* Always return PasswordTooShort on invalid passwords. */
> + status = NERR_PasswordTooShort;
> + goto user_add_error;
> + }
'break' would work just fine instead of 'goto' in all these places.
--
Dmitry.
More information about the wine-devel
mailing list