Displaying 8 results from an estimated 8 matches for "rex_uuid".
2020 Jan 24
1
Re: [v2v PATCH 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...er their uploads (if you do, you must supply one for each disk):
> -oo rhv-disk-uuid=UUID Disk UUID
> ")
>
> +let is_nonnil_uuid uuid =
> + let nil_uuid = "00000000-0000-0000-0000-000000000000" in
> + let hex = "[a-fA-F0-9]" in
> + let rex_uuid = "^"^hex^"{8}-"^hex^"{4}-"^hex^"{4}-"^hex^"{4}-"^hex^"{12}$" in
Use sprintf?
> + let rex_uuid = PCRE.compile rex_uuid in
> + if uuid = nil_uuid then false
> + else PCRE.matches rex_uuid uuid
This could compile the regexp on...
2020 Jan 23
5
[v2v PATCH 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
Martin Kletzander (2):
rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
rhv-upload: Check that rhv-disk-uuid is not already taken
(RHBZ#1789279)
2020 Jan 29
1
Re: [PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
.../v2v/output_rhv_upload.ml
>@@ -49,6 +49,16 @@ after their uploads (if you do, you must supply one for each disk):
> -oo rhv-disk-uuid=UUID Disk UUID
> ")
>
>+let is_nonnil_uuid uuid =
>+ let nil_uuid = "00000000-0000-0000-0000-000000000000" in
>+ let rex_uuid = lazy (
>+ let hex = "[a-fA-F0-9]" in
>+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
>+ PCRE.compile str
>+ ) in
>+ if uuid = nil_uuid then false
>+ else PCRE.matches rex_uuid uuid
>+
> let parse_output_options...
2020 Mar 11
4
[PATCH v2v v3 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v3 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
v3:
- Do the check in precheck
- Fix for Lazy evaluation of regexp UUID
v2:
- https://www.redhat.com/archives/libguestfs/2020-January/msg00221.html
- Use EEXIST instead of EINVAL
- Put the
2020 Jan 23
0
[v2v PATCH 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
...hv_upload.ml
@@ -49,6 +49,14 @@ after their uploads (if you do, you must supply one for each disk):
-oo rhv-disk-uuid=UUID Disk UUID
")
+let is_nonnil_uuid uuid =
+ let nil_uuid = "00000000-0000-0000-0000-000000000000" in
+ let hex = "[a-fA-F0-9]" in
+ let rex_uuid = "^"^hex^"{8}-"^hex^"{4}-"^hex^"{4}-"^hex^"{4}-"^hex^"{12}$" in
+ let rex_uuid = PCRE.compile rex_uuid in
+ if uuid = nil_uuid then false
+ else PCRE.matches rex_uuid uuid
+
let parse_output_options options =
let rhv_cafile = ref N...
2020 Jan 29
4
[PATCH v2v v2 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v2 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279
It took me quite some time to go through the whole rfc 4122 just to realize we
do not need to do anything with the versions.
v2:
- Use EEXIST instead of EINVAL
- Put the colliding UUID into the error
- Do not evaluate the PCRE needlessly multiple times
v1:
2020 Jan 29
0
[PATCH v2v v2 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
.../output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -49,6 +49,16 @@ after their uploads (if you do, you must supply one for each disk):
-oo rhv-disk-uuid=UUID Disk UUID
")
+let is_nonnil_uuid uuid =
+ let nil_uuid = "00000000-0000-0000-0000-000000000000" in
+ let rex_uuid = lazy (
+ let hex = "[a-fA-F0-9]" in
+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
+ PCRE.compile str
+ ) in
+ if uuid = nil_uuid then false
+ else PCRE.matches rex_uuid uuid
+
let parse_output_options options =
let rhv_cafile = r...
2020 Mar 11
0
[PATCH v2v v3 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)
.../output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -49,6 +49,16 @@ after their uploads (if you do, you must supply one for each disk):
-oo rhv-disk-uuid=UUID Disk UUID
")
+let is_nonnil_uuid uuid =
+ let nil_uuid = "00000000-0000-0000-0000-000000000000" in
+ let rex_uuid = lazy (
+ let hex = "[a-fA-F0-9]" in
+ let str = sprintf "^%s{8}-%s{4}-%s{4}-%s{4}-%s{12}$" hex hex hex hex hex in
+ PCRE.compile str
+ ) in
+ if uuid = nil_uuid then false
+ else PCRE.matches (Lazy.force rex_uuid) uuid
+
let parse_output_options options =
let r...