mansikulkarni96
dfc8b271cf
[kubelet] Make use of os.ModeSocket info
2025-02-21 18:02:25 -05:00
Tim Allclair
a7340ff36c
[windows] Don't chown existing directory in MkdirAll
2024-12-16 14:10:56 -08:00
Mark Rossetti
b377dfba0c
Add funcs in pkg/filesystem/util that can actually set file permissiosn
...
on Windows and update container log dir perms to 660 on Windows
2024-07-15 14:22:59 -07:00
Maksym Pavlenko
be4b7176dc
Fix Abs path validation on Windows ( #124084 )
...
* Windows: Consider slash-prefixed paths as absolute
filepath.IsAbs does not consider "/" or "\" as absolute paths, even
though files can be addressed as such. [1][2]
Currently, there are some unit tests that are failing on Windows due to
this reason.
[1] https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#traditional-dos-paths
[2] https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#fully-qualified-vs-relative-paths
* Add test to verify IsAbs for windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Fix abs path validation on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Skipp path clean check for podLogDir on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Implement IsPathClean to validate path
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
* Add warn comment for IsAbs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
---------
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com >
Co-authored-by: Claudiu Belu <cbelu@cloudbasesolutions.com >
2024-04-10 10:13:59 -07:00
Claudiu Belu
b4d1440063
unittests: Fixes hostutil.GetFileType for Windows
...
GetFileType is meant to return the type of the given file by using os.Stat.
However, os.Stat doesn't work on Windows for Unix Sockets, causing an error to occur:
[2-Socket Test] unexpected error :
CreateFile C:\Users\Administrator\AppData\Local\Temp\test-get-filetype-2776877299\mt.sock:
The file cannot be accessed by the system.
This is a known issue and we're already using a workaround for this in
pkg/kubelet/util/util_windows.go.
This commit fixes this issue for GetFileType on Windows.
2023-06-01 16:02:07 +00:00