Explorar el Código

permissions(k): safety check for db_handle

- avoid double initialization of trusted ops db handler
(cherry picked from commit df2d92a1f0698e0d108ec080de5fc3673d332209)
Daniel-Constantin Mierla hace 15 años
padre
commit
a6abcee6da
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      modules_k/permissions/trusted.c

+ 2 - 2
modules_k/permissions/trusted.c

@@ -231,10 +231,10 @@ error:
  */
 int init_child_trusted(int rank)
 {
-    	if ((rank <= 0) && (rank != PROC_RPC) && (rank != PROC_UNIXSOCK))
+    if ((rank <= 0) && (rank != PROC_RPC) && (rank != PROC_UNIXSOCK))
 		return 0;
 
-	if (!db_url.s) {
+	if (!db_url.s || db_handle) {
 		return 0;
 	}