Re: netapi32: [2/5] Implement NetUserAdd with a dummy user database.
23 Mar
2007
23 Mar
'07
11:34 p.m.
"Kai Blin" <kai.blin(a)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.
6928
Age (days ago)
6928
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov