Check for permissions handle by testing for != 0
The test gates access-control plugin invocation and with the inverted condition all remote readers/writers requiring access control are blocked eiter because of the permissions handle, or because a NIL handle is passed to the access control plugin. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									4a6b134126
								
							
						
					
					
						commit
						0354b42cdc
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -1956,7 +1956,7 @@ bool q_omg_security_check_remote_writer_permissions(const struct proxy_writer *p
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    DDS_Security_PermissionsHandle permissions_handle;
 | 
					    DDS_Security_PermissionsHandle permissions_handle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((permissions_handle = get_permissions_handle(pp, pwr->c.proxypp)) != 0)
 | 
					    if ((permissions_handle = get_permissions_handle(pp, pwr->c.proxypp)) == 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      GVTRACE("Secure remote writer "PGUIDFMT" proxypp does not have permissions handle yet\n", PGUID(pwr->e.guid));
 | 
					      GVTRACE("Secure remote writer "PGUIDFMT" proxypp does not have permissions handle yet\n", PGUID(pwr->e.guid));
 | 
				
			||||||
      return false;
 | 
					      return false;
 | 
				
			||||||
| 
						 | 
					@ -2180,7 +2180,7 @@ bool q_omg_security_check_remote_reader_permissions(const struct proxy_reader *p
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    DDS_Security_PermissionsHandle permissions_handle;
 | 
					    DDS_Security_PermissionsHandle permissions_handle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((permissions_handle = get_permissions_handle(pp, prd->c.proxypp)) != 0)
 | 
					    if ((permissions_handle = get_permissions_handle(pp, prd->c.proxypp)) == 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      GVTRACE("Secure remote reader "PGUIDFMT" proxypp does not have permissions handle yet\n", PGUID(prd->e.guid));
 | 
					      GVTRACE("Secure remote reader "PGUIDFMT" proxypp does not have permissions handle yet\n", PGUID(prd->e.guid));
 | 
				
			||||||
      return false;
 | 
					      return false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue