mirror of
https://github.com/RedTeamPentesting/adauth
synced 2026-06-08 12:20:46 +00:00
Fail on non-existing ccache
This commit is contained in:
+6
-2
@@ -262,9 +262,13 @@ func (opts *Options) preliminaryCredential() (*Credential, error) {
|
||||
|
||||
if opts.CCache != "" {
|
||||
s, err := os.Stat(opts.CCache)
|
||||
if err == nil && !s.IsDir() {
|
||||
ccache = opts.CCache
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("stat CCache path: %w", err)
|
||||
} else if s.IsDir() {
|
||||
return nil, fmt.Errorf("CCache path is a directory: %s", opts.CCache)
|
||||
}
|
||||
|
||||
ccache = opts.CCache
|
||||
}
|
||||
|
||||
cred := &Credential{
|
||||
|
||||
Reference in New Issue
Block a user