File tree 7 files changed +4
-26
lines changed
7 files changed +4
-26
lines changed Original file line number Diff line number Diff line change 34
34
ErrCompressionInvalid = errors .New ("invalid compression method" )
35
35
36
36
// Storage section errors
37
- ErrFilePermissionsUnset = errors .New ("permissions unset, defaulting to 0644" )
38
- ErrDirectoryPermissionsUnset = errors .New ("permissions unset, defaulting to 0755" )
39
37
ErrFileUsedSymlink = errors .New ("file path includes link in config" )
40
38
ErrDirectoryUsedSymlink = errors .New ("directory path includes link in config" )
41
39
ErrLinkUsedSymlink = errors .New ("link path includes link in config" )
91
89
92
90
// AWS S3 specific errors
93
91
ErrInvalidS3ObjectVersionId = errors .New ("invalid S3 object VersionId" )
92
+
93
+ // Obsolete errors, left here for ABI compatibility
94
+ ErrFilePermissionsUnset = errors .New ("permissions unset, defaulting to 0644" )
95
+ ErrDirectoryPermissionsUnset = errors .New ("permissions unset, defaulting to 0755" )
94
96
)
95
97
96
98
// NewNoInstallSectionError produces an error indicating the given unit, named
Original file line number Diff line number Diff line change 15
15
package types
16
16
17
17
import (
18
- "github.com/coreos/ignition/v2/config/shared/errors"
19
-
20
18
"github.com/coreos/vcontext/path"
21
19
"github.com/coreos/vcontext/report"
22
20
)
23
21
24
22
func (d Directory ) Validate (c path.ContextPath ) (r report.Report ) {
25
23
r .Merge (d .Node .Validate (c ))
26
24
r .AddOnError (c .Append ("mode" ), validateMode (d .Mode ))
27
- if d .Mode == nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrDirectoryPermissionsUnset )
29
- }
30
25
return
31
26
}
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ import (
24
24
func (f File ) Validate (c path.ContextPath ) (r report.Report ) {
25
25
r .Merge (f .Node .Validate (c ))
26
26
r .AddOnError (c .Append ("mode" ), validateMode (f .Mode ))
27
- if f .Mode == nil && f .Contents .Source != nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrFilePermissionsUnset )
29
- }
30
27
r .AddOnError (c .Append ("overwrite" ), f .validateOverwrite ())
31
28
return
32
29
}
Original file line number Diff line number Diff line change 15
15
package types
16
16
17
17
import (
18
- "github.com/coreos/ignition/v2/config/shared/errors"
19
-
20
18
"github.com/coreos/vcontext/path"
21
19
"github.com/coreos/vcontext/report"
22
20
)
23
21
24
22
func (d Directory ) Validate (c path.ContextPath ) (r report.Report ) {
25
23
r .Merge (d .Node .Validate (c ))
26
24
r .AddOnError (c .Append ("mode" ), validateMode (d .Mode ))
27
- if d .Mode == nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrDirectoryPermissionsUnset )
29
- }
30
25
return
31
26
}
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ import (
24
24
func (f File ) Validate (c path.ContextPath ) (r report.Report ) {
25
25
r .Merge (f .Node .Validate (c ))
26
26
r .AddOnError (c .Append ("mode" ), validateMode (f .Mode ))
27
- if f .Mode == nil && f .Contents .Source != nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrFilePermissionsUnset )
29
- }
30
27
r .AddOnError (c .Append ("overwrite" ), f .validateOverwrite ())
31
28
return
32
29
}
Original file line number Diff line number Diff line change 15
15
package types
16
16
17
17
import (
18
- "github.com/coreos/ignition/v2/config/shared/errors"
19
-
20
18
"github.com/coreos/vcontext/path"
21
19
"github.com/coreos/vcontext/report"
22
20
)
23
21
24
22
func (d Directory ) Validate (c path.ContextPath ) (r report.Report ) {
25
23
r .Merge (d .Node .Validate (c ))
26
24
r .AddOnError (c .Append ("mode" ), validateMode (d .Mode ))
27
- if d .Mode == nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrDirectoryPermissionsUnset )
29
- }
30
25
return
31
26
}
Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ import (
24
24
func (f File ) Validate (c path.ContextPath ) (r report.Report ) {
25
25
r .Merge (f .Node .Validate (c ))
26
26
r .AddOnError (c .Append ("mode" ), validateMode (f .Mode ))
27
- if f .Mode == nil && f .Contents .Source != nil {
28
- r .AddOnWarn (c .Append ("mode" ), errors .ErrFilePermissionsUnset )
29
- }
30
27
r .AddOnError (c .Append ("overwrite" ), f .validateOverwrite ())
31
28
return
32
29
}
You can’t perform that action at this time.
0 commit comments