// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(WGT_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(WGT_PARTNER_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(WGT_PLATFORM_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(OSP_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(OSP_PARTNER_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
// Check if SMACK label really set
char *label;
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error getting current process label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error getting current process label");
RUNNER_ASSERT_MSG(label != NULL, "Process label is not set");
result = strcmp(OSP_PLATFORM_APP_ID, label);
RUNNER_ASSERT_MSG(result == 0, "Process label " << label << " is incorrect");
if (fd < 0)
return;
result = smack_new_label_from_self(&smack_label);
- if (result != 0) {
+ if (result < 0) {
close(fd);
close(sock);
free(smack_label);
//int smack_new_label_from_self(char **label);
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error in getting self label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error in getting self label");
//comparing this label with default one "_"
result = strcmp(label, def_rule);
//checking new label using smack function
result = smack_new_label_from_self(&label);
- RUNNER_ASSERT_MSG(result == 0, "Error in getting self label");
+ RUNNER_ASSERT_MSG(result >= 0, "Error in getting self label");
result = strcmp(label, "cola");
RUNNER_ASSERT_MSG(result == 0, "Wrong process label");
if (fd < 0)
return;
result = smack_new_label_from_self(&smack_label);
- RUNNER_ASSERT_MSG(result == 0, "smack_new_label_from_self() failed");
+ RUNNER_ASSERT_MSG(result >= 0, "smack_new_label_from_self() failed");
result = write(fd, smack_label, strlen(smack_label));
RUNNER_ASSERT_MSG(result == (int)strlen(smack_label), "write() failed");
close(fd);
alarm(0);
smack_label1[result] = '\0';
result = smack_new_label_from_socket(sock, &smack_label2);
- RUNNER_ASSERT_MSG(result == 0, "smack_label_from_socket failed");
+ RUNNER_ASSERT_MSG(result >= 0, "smack_label_from_socket failed");
result = strcmp(smack_label1, smack_label2);
if (i < 3)
RUNNER_ASSERT_MSG(result == 0, "smack labels differ: '" << smack_label1 << "' != '" << smack_label2 << "' i == " << i);