@@ -217,7 +217,7 @@ do { \
217217 PLOGE ("write(bin)" );
218218 return -1 ;
219219 }
220- cmd = ( ctx -> to . command ) ? ctx -> to . command : ctx -> to . shell ;
220+ cmd = get_command ( & ctx -> to ) ;
221221 cmd_size = strlen (cmd ) + 1 ;
222222 write_token (fd , cmd_size );
223223 len = write (fd , cmd , cmd_size );
@@ -262,7 +262,7 @@ static void usage(int status)
262262
263263static void deny (struct su_context * ctx )
264264{
265- char * cmd = ( ctx -> to . command ) ? ctx -> to . command : ctx -> to . shell ;
265+ char * cmd = get_command ( & ctx -> to ) ;
266266
267267 send_intent (ctx , "" , 0 , 1 );
268268 LOGW ("request rejected (%u->%u %s)" , ctx -> from .uid , ctx -> to .uid , cmd );
@@ -306,7 +306,7 @@ static void allow(struct su_context *ctx)
306306
307307 LOGD ("%u %s executing %u %s using shell %s : %s%s%s%s%s%s%s%s%s%s%s%s%s%s" ,
308308 ctx -> from .uid , ctx -> from .bin ,
309- ctx -> to .uid , ( ctx -> to . command ) ? ctx -> to . command : ctx -> to . shell , ctx -> to .shell ,
309+ ctx -> to .uid , get_command ( & ctx -> to ) , ctx -> to .shell ,
310310 arg0 , PARG (0 ), PARG (1 ), PARG (2 ), PARG (3 ), PARG (4 ), PARG (5 ),
311311 (ctx -> to .optind + 6 < ctx -> to .argc ) ? " ..." : "" );
312312
0 commit comments