
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1201194993 28800 # Node ID 3717fb3202ecf289ffb05a94f7d2375658c4191b # Parent b0b9833dfa219a3e9a7898c0b6f5bab7afaf460a Check CreationClassName in MigrationService Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r b0b9833dfa21 -r 3717fb3202ec src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Jan 24 09:16:26 2008 -0800 +++ b/src/Virt_VSMigrationService.c Thu Jan 24 09:16:33 2008 -0800 @@ -204,6 +204,15 @@ static CMPIStatus vs_migratable_host(CMP return s; } + if (!check_refs_pfx_match(ref, system)) { + printf("Classname: %s\n", CLASSNAME(system)); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Invalid REF in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + return vs_migratable(ref, name, dhost, results); } @@ -235,6 +244,14 @@ static CMPIStatus vs_migratable_system(C cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + if (!check_refs_pfx_match(ref, sys)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Invalid REF in ComputerSystem"); METHOD_RETURN(results, 1); return s; } @@ -549,6 +566,14 @@ static CMPIStatus migrate_vs_host(CMPIMe return s; } + if (!check_refs_pfx_match(ref, system)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Invalid REF in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + return migrate_do(ref, ctx, name, dhost, results, argsout); } @@ -580,6 +605,14 @@ static CMPIStatus migrate_vs_system(CMPI cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Missing key (Name) in ComputerSystem"); + METHOD_RETURN(results, 1); + return s; + } + + if (!check_refs_pfx_match(ref, sys)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Invalid REF in ComputerSystem"); METHOD_RETURN(results, 1); return s; }