!nshlib: Require explicit fixed login password at build time#3557
Open
Abhishekmishra2808 wants to merge 1 commit into
Open
!nshlib: Require explicit fixed login password at build time#3557Abhishekmishra2808 wants to merge 1 commit into
Abhishekmishra2808 wants to merge 1 commit into
Conversation
Change NSH_LOGIN_USERNAME default to root, remove the Administrator and nuttx password fallbacks, and fail the build when NSH_LOGIN_FIXED is enabled with an empty CONFIG_NSH_LOGIN_PASSWORD. BREAKING CHANGE: Builds with CONFIG_NSH_LOGIN_FIXED=y no longer succeed until CONFIG_NSH_LOGIN_PASSWORD is set in menuconfig at Application Configuration ---> NSH Library ---> Verification method ---> Fixed username/password ---> Login password. Update local defconfigs or set the password via menuconfig before building. Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2b8eb4f to
a5ffd53
Compare
| config NSH_LOGIN_PASSWORD | ||
| string "Login password" | ||
| default "Administrator" | ||
| default "" |
Contributor
There was a problem hiding this comment.
remove the default value
| CSRCS += nsh_passwdcmds.c | ||
| endif | ||
|
|
||
| ifeq ($(CONFIG_NSH_LOGIN_FIXED),y) |
Contributor
There was a problem hiding this comment.
why not remove the default value in the case of CONFIG_NSH_LOGIN_FIXED directly and remove this warning check, so the user must enter the password in defconfig.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NSH_LOGIN_USERNAMEdefault fromadmintoroot.Administrator,nuttx).NSH_LOGIN_FIXED=yand password is empty.BREAKING CHANGE: Set
CONFIG_NSH_LOGIN_PASSWORDin menuconfig at Application Configuration ---> NSH Library ---> Verification method ---> Fixed username/password ---> Login password before building withCONFIG_NSH_LOGIN_FIXED=y.Testing
NSH_LOGIN_FIXED=y+ empty password → build fails