# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1201212668 28800
# Node ID b8f454a12678a26c1a93d803b7b2d29e40c4b0b4
# Parent b0b9833dfa219a3e9a7898c0b6f5bab7afaf460a
Check CreationClassName in MigrationService
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r b0b9833dfa21 -r b8f454a12678 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 14:11:08 2008 -0800
@@ -204,6 +204,14 @@ static CMPIStatus vs_migratable_host(CMP
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 vs_migratable(ref, name, dhost, results);
}
@@ -235,6 +243,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 +565,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 +604,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;
}