Commit 13c34585 authored by jan.koester's avatar jan.koester
Browse files

test

parent dd15d948
Loading
Loading
Loading
Loading
+10 −0
Changes for src/sharectl.cpp: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -367,6 +367,16 @@ int smbpasswd(int argc, char **argv) {
        std::cerr << "sharectl: root can't log in over SMB\n";
        return 1;
    }
    // a user of another source (adconnect): no shadow entry, "*" as
    // password; the domain controller checks its SMB logins, and a local
    // password would shadow the domain's
    struct spwd *sp = getspnam(account->pw_name);
    endspent();
    if (!sp && account->pw_passwd && std::string(account->pw_passwd) == "*") {
        std::cerr << "sharectl: " << user << " is a domain user: SMB logins go to the domain controller, "
                     "no local password needed\n";
        return 1;
    }
    endpwent();
    std::string pw;
    if (!remove) {