Menu

#42 make security unlock handle special password NULL

Unstable (example)
open
None
5
2016-02-22
2016-02-22
Tom Yan
No

hdparm.c:

...
    } else if (0 == strcasecmp(name, "security-unlock")) {
        set_security = 1;
        security_command = ATA_OP_SECURITY_UNLOCK;
        get_security_password(0);
    } else if (0 == strcasecmp(name, "security-set-pass")) {
        set_security = 1;
        security_command = ATA_OP_SECURITY_SET_PASS;
        get_security_password(1);
    } else if (0 == strcasecmp(name, "security-disable")) {
        set_security = 1;
        security_command = ATA_OP_SECURITY_DISABLE;
        get_security_password(1);
    } else if (0 == strcasecmp(name, "security-erase")) {
        set_security = 1;
        security_command = ATA_OP_SECURITY_ERASE_UNIT;
        get_security_password(1);
    } else if (0 == strcasecmp(name, "security-erase-enhanced")) {
        set_security = 1;
        enhanced_erase = 1;
        security_command = ATA_OP_SECURITY_ERASE_UNIT;
        get_security_password(1);
...

It doesn't seem to make sense that every other commands that convert the password "NULL" to empty but just not security unlock. I assume that it's a typo?

Attached is a patch that change the only get_security_password(0) to get_security_password(1).

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.