Commit Graph

53 Commits

Author SHA1 Message Date
903d09f6-e821-4655-9e8b-7e6068b26f74
b448cd1147 Avoid Duplicattion
Move pclose to the end of function.
2024-07-23 19:22:56 +09:00
903d09f6-e821-4655-9e8b-7e6068b26f74
02a71845ae Fix Potential Handler Leaks #2
Add fclose before function out
2024-07-23 10:21:12 +09:00
903d09f6-e821-4655-9e8b-7e6068b26f74
fd735fca4b Fix Potential Handler Leaks #1
Add pclose before function out
2024-07-23 10:17:48 +09:00
DanyT
70f05e512c resolve code-sytle-check issues 2024-07-05 07:55:42 +03:00
DanyT
4a19bc2a5f add support to free a stack based allocated kubeconfig_t 2024-07-03 18:48:51 +03:00
DanyT
34d1b13efe Check that only one of the kubeconfig_t::fileName and kubeconfig_t::buffer is set
Add documentation note stating that only of the kubeconfig_t::fileName and kubeconfig_t::buffer may be set
2024-07-03 09:18:24 +03:00
DanyT
8f759fcfb7 fix typo
close filehandle only if we opened one
2024-07-02 11:58:32 +03:00
DanyT
6d3bd66121 add support to load kubernetes configuration for memory buffer
- existing api is not changed
   - load_kube_config works as before
- extend kubeconfig_t to hold in memory buffer
- make a common flow for file/buffer code
- set fileName/buffer members accordingly
- provide new api: load_kube_config_buffer
2024-07-01 18:55:51 +03:00
aiden
79ab588d74 fixed 2023-07-22 11:51:59 +08:00
hirishh
bbaa861cde Fix loading users.user.token from yaml config 2023-04-04 16:32:43 +02:00
Hui Yu
de071b82c0 Include config.h to define HAVE_SECURE_GETENV or HAVE_GETENV 2023-03-30 15:00:37 +08:00
Hui Yu
20d4ad12a6 Increase buffer size 2023-03-24 20:36:56 +08:00
Ahmed Yarub Hani Al Nuaimi
2e2b5c91da Fix symbol tests 2023-02-09 22:36:24 -03:00
Ahmed Yarub Hani Al Nuaimi
ccef130aeb Temporarily revert changes 2023-02-09 21:40:22 -03:00
Ahmed Yarub Hani Al Nuaimi
c8c27b1da6 Correct check for getenv()/secure_getenv() 2023-02-08 19:23:16 -03:00
Hui Yu
1ab7d304d3 code style check and fix 2023-01-16 15:42:58 +08:00
Hui Yu
2887dd5fee * Fix memory leak when kubeconfig is invalid
* Add a test for this case
2023-01-16 15:41:01 +08:00
hirishh
1e06eb2dfd Load user certificates by file path 2023-01-13 17:09:51 +01:00
Iacopo Rozzo
fc4f5d1f27 Address review comments 2022-12-30 16:37:52 +01:00
Iacopo Rozzo
42a7642d4e Add support for IPv6 addresses in the in-cluster resolution
This change adds support for kubernetes services with cluster IPs v6 for
the in cluster resolution. Previously, the IP v6 addresses were not wrapped
in square brackets when forming the Apiserver URL.
2022-12-30 15:13:40 +01:00
Iacopo Rozzo
703fdc63ef Add check for the presence of secure_getenv
This change introduces support for glibc versions older than 2.17 where
secure_getenv was introduced.
2022-12-29 17:47:02 +01:00
chenxm
86dc1b2b9b Resolve cpp keyword conflict 2022-08-25 20:07:05 +08:00
Hui Yu
84ca277aa9 Update create/free list function names due to changes in generated code 2022-03-09 14:09:10 +08:00
Ahmed Yarub Hani Al Nuaimi
f42a8f5645 Use secure_getenv() when building using Emscripten 2022-01-16 18:57:03 -03:00
Ahmed Yarub Hani Al Nuaimi
64dcf16b20 MacOS adaptations 2021-09-20 10:27:35 -03:00
Ahmed Yarub Hani Al Nuaimi
b05e7724b4 MacOS adaptations 2021-09-19 14:31:26 -03:00
Ahmed Yarub Hani Al Nuaimi
f264e268f7 Android adaptations 2021-09-19 14:26:42 -03:00
Ahmed Yarub Hani Al Nuaimi
a97900a799 Refactoring 2021-09-10 10:51:49 -03:00
Ahmed Yarub Hani Al Nuaimi
9271886c7d Refactoring 2021-09-09 10:08:30 -03:00
Ahmed Yarub Hani Al Nuaimi
a552d1cc95 Refactoring 2021-09-09 09:55:49 -03:00
Ahmed Yarub Hani Al Nuaimi
6a9bf51465 Refactoring 2021-09-09 09:54:02 -03:00
Ahmed Yarub Hani Al Nuaimi
d0390e2b08 Revert change 2021-09-09 09:51:52 -03:00
Ahmed Yarub Hani Al Nuaimi
5e2613354b Fix indentation 2021-09-09 09:50:29 -03:00
Ahmed Yarub Hani Al Nuaimi
3fc6d82749 Fix indentation 2021-09-09 09:49:05 -03:00
Ahmed Yarub Hani Al Nuaimi
e867d72dc1 Fix indentation 2021-09-09 09:48:22 -03:00
Ahmed Yarub Hani Al Nuaimi
ddc4fc4241 Fix indentation 2021-09-09 09:43:53 -03:00
Ahmed Yarub Hani Al Nuaimi
f6842a0e3f Fix indentation 2021-09-09 09:35:48 -03:00
Ahmed Yarub Hani Al Nuaimi
faf6405d9e Fix indentation 2021-09-09 09:35:09 -03:00
Ahmed Yarub Hani Al Nuaimi
a924769973 Fix Formatting 2021-09-08 01:22:18 -03:00
Ahmed Yarub Hani Al Nuaimi
a2d7fe2de8 Fix indentation 2021-09-08 01:20:18 -03:00
Ahmed Yarub Hani Al Nuaimi
9c7fc8baa0 Correct freeing resource 2021-09-08 00:30:27 -03:00
Ahmed Yarub Hani Al Nuaimi
1d5348f99e Remove duplicate macro
Add alternative strndup implementation
2021-09-06 18:18:47 -03:00
Ahmed Yarub Hani Al Nuaimi
4221f70114 More conditional includes 2021-09-05 12:16:40 -03:00
Ahmed Yarub Hani Al Nuaimi
eb2fa17582 Make test buildable both using a Makefile and CMake
Fix conditional commands
2021-09-04 22:16:17 -03:00
Ahmed Yarub Hani Al Nuaimi
00c9cedf59 Conditional compilation for UNIX specific libraries
Add TLS configuration parsing
2021-09-04 12:49:02 -03:00
Ahmed Yarub Hani Al Nuaimi
99a084b5a1 Increase maximum bearer token size to avoid truncation
(cherry picked from commit 79a7a820c0db292a7605a631a060d6cbe05e8cd6)
2021-08-16 09:36:07 -03:00
Hui Yu
369762b089 [Multi-Thread] Remove cJSON_GetErrorPtr in examples and authentication plugin code to ensure thread safety 2021-03-30 20:55:12 +08:00
Hui Yu
84c76b5d49 1. Re-generate c client to merge PR #7467 of openapi-generator
2. Remove the duplicated definition of "clear_and_free_string_list" after code merge
2020-09-26 13:09:03 +08:00
Hui Yu
43aaf95cd1 [Configuration]
1. Authentication provider plugin framework

2. An instance of authentication provider plugin for OIDC (OpenID Connect)
2020-08-19 21:38:06 +08:00
Hui Yu
dc590fb0d3 [Configuration] Support exec for kubeconfig 2020-05-24 12:17:29 +00:00