Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116268

Missing CAP_NET_ADMIN permission

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4
    • None
    • see abpove
    • Linux/X11

    Description

      FYI
      Missing CAP_NET_ADMIN permission error is generrated by

      m_discoveryAgent->start(QBluetoothServiceDiscoveryAgent::MinimalDiscovery);

      which is used in Qt examples "bychat" .

      This error has been disused ( on forum) since 5.15 and NEVER fixed , it is now generated by 6.4

      Best guess -
      it has something to do with Qt using "bluez" and not running in Linux root.

      it works fine using bluethootctl

      nov25-1@nov251-desktop:~$ bluethootctl
      bluethootctl: command not found
      nov25-1@nov251-desktop:~$ bluetoothctl
      Agent registered
      [CHG] Controller 00:50:B6:80:4D:5D Pairable: yes
      [bluetooth]# scan
      Missing on/off/bredr/le argument
      [bluetooth]# scan on
      Discovery started
      [CHG] Controller 00:50:B6:80:4D:5D Discovering: yes
      [NEW] Device 98:D3:31:F8:39:33 SPP-CA
      [DEL] Device ED:C3:50:CA:6D:29 OontZ Angle solo D29
      [CHG] Device 98:D3:31:F8:39:33 RSSI is nil
      [DEL] Device 98:D3:31:F8:39:33 SPP-CA
      [CHG] Controller 00:50:B6:80:4D:5D Class: 0x00000000
      [CHG] Controller 00:50:B6:80:4D:5D Powered: no
      [CHG] Controller 00:50:B6:80:4D:5D Discovering: no
      [DEL] Controller 00:50:B6:80:4D:5D nov251-desktop [default]
      [NEW] Controller 00:50:B6:80:4D:5D nov251-desktop [default]
      [NEW] Device ED:C3:50:CA:6D:29 OontZ Angle solo D29

      FULL ERROR
      https://forum.qt.io/topic/114503/missing-cap_net_admin-permission/11?page=2
      FULL ERROR
      qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
      FULL ERROR

      Qt 6.4.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.3.1 20210422 (Red Hat 10.3.1-1)) on "wayland" 
      OS: Ubuntu 22.04.3 LTS [linux version 5.19.0-45-generic]
      
      Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 RDRAND
      
      Environment:
        QT_ACCESSIBILITY="1"
        QT_IM_MODULE="ibus"
      
      Features: QT_NO_EXCEPTIONS
      
      Library info:
        PrefixPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt
        DocumentationPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/doc
        HeadersPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/include
        LibrariesPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/lib
        LibraryExecutablesPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/libexec
        BinariesPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/bin
        PluginsPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/plugins
        QmlImportsPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/qml
        ArchDataPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt
        DataPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt
        TranslationsPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/translations
        ExamplesPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/examples
        TestsPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt/tests
        SettingsPath: /home/nov25-1/Qt/Nov26/Tools/QtCreator/lib/Qt
      
      Standard paths [*...* denote writable entry]:
        DesktopLocation: "Desktop" */home/nov25-1/Desktop*
        DocumentsLocation: "Documents" */home/nov25-1/Documents*
        FontsLocation: "Fonts" */home/nov25-1/.local/share/fonts* /home/nov25-1/.fonts /usr/share/ubuntu/fonts /usr/local/share/fonts /usr/share/fonts /var/lib/snapd/desktop/fonts
        ApplicationsLocation: "Applications" */home/nov25-1/.local/share/applications* /usr/share/ubuntu/applications /usr/local/share/applications /usr/share/applications /var/lib/snapd/desktop/applications
        MusicLocation: "Music" */home/nov25-1/Music*
        MoviesLocation: "Movies" */home/nov25-1/Videos*
        PicturesLocation: "Pictures" */home/nov25-1*
        TempLocation: "Temporary Directory" */tmp*
        HomeLocation: "Home" */home/nov25-1*
        AppLocalDataLocation: "Application Data" */home/nov25-1/.local/share/QtProject/qtdiag* /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
        CacheLocation: "Cache" */home/nov25-1/.cache/QtProject/qtdiag*
        GenericDataLocation: "Shared Data" */home/nov25-1/.local/share* /usr/share/ubuntu /usr/local/share /usr/share /var/lib/snapd/desktop
        RuntimeLocation: "Runtime" */run/user/1000*
        ConfigLocation: "Configuration" */home/nov25-1/.config* /etc/xdg/xdg-ubuntu /etc/xdg
        DownloadLocation: "Download" */home/nov25-1/Downloads*
        GenericCacheLocation: "Shared Cache" */home/nov25-1/.cache*
        GenericConfigLocation: "Shared Configuration" */home/nov25-1/.config* /etc/xdg/xdg-ubuntu /etc/xdg
        AppDataLocation: "Application Configuration" */home/nov25-1/.local/share/QtProject/qtdiag* /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
        AppConfigLocation: "Application Configuration" */home/nov25-1/.config/QtProject/qtdiag* /etc/xdg/xdg-ubuntu/QtProject/qtdiag /etc/xdg/QtProject/qtdiag
      
      File selectors (increasing order of precedence):
        en_US unix linux ubuntu
      
      Network:
        
      SSL is not supported.
      
      Platform capabilities: ThreadedPixmaps OpenGL ThreadedOpenGL BufferQueueingOpenGL MultipleWindows NonFullScreenWindows NativeWidgets WindowManagement RasterGLSurface
      
      Style hints:
        mouseDoubleClickInterval: 400
        mousePressAndHoldInterval: 500
        startDragDistance: 8
        startDragTime: 500
        startDragVelocity: 0
        keyboardInputInterval: 400
        keyboardAutoRepeatRate: 30
        cursorFlashTime: 1200
        showIsFullScreen: 0
        showIsMaximized: 0
        passwordMaskDelay: 0
        passwordMaskCharacter: U+2022
        fontSmoothingGamma: 1.7
        useRtlExtensions: 0
        setFocusOnTouchRelease: 0
        tabFocusBehavior: Qt::TabFocusAllControls 
        singleClickActivation: 0
      
      Additional style hints (QPlatformIntegration):
        ReplayMousePressOutsidePopup: 1
      
      Theme:
        Platforms requested : ubuntu,gtk3,gnome,generic
                  available : snap,flatpak,xdgdesktopportal,gtk3
        Styles requested    : Fusion,windows
               available    : Windows,Fusion
        Icon theme          : Yaru,  from /home/nov25-1/.local/share/icons,/usr/share/icons,/var/lib/snapd/desktop/icons
        System font         : "Ubuntu" 11
        Native file dialog
        Native color dialog
        Native font dialog
      
      Fonts:
        General font : "Ubuntu" 11
        Fixed font   : "monospace" 11
        Title font   : "DejaVu LGC Sans" 12
        Smallest font: "DejaVu LGC Sans" 12
      
      Palette:
        QPalette::WindowText: #ff000000
        QPalette::Button: #ffefefef
        QPalette::Light: #ffffffff
        QPalette::Midlight: #ffcacaca
        QPalette::Dark: #ff9f9f9f
        QPalette::Mid: #ffb8b8b8
        QPalette::Text: #ff000000
        QPalette::BrightText: #ffffffff
        QPalette::ButtonText: #ff000000
        QPalette::Base: #ffffffff
        QPalette::Window: #ffefefef
        QPalette::Shadow: #ff767676
        QPalette::Highlight: #ff308cc6
        QPalette::HighlightedText: #ffffffff
        QPalette::Link: #ff0000ff
        QPalette::LinkVisited: #ffff00ff
        QPalette::AlternateBase: #fff7f7f7
        QPalette::NoRole: #ff000000
        QPalette::ToolTipBase: #ffffffdc
        QPalette::ToolTipText: #ff000000
        QPalette::PlaceholderText: #80000000
      
      Screens: 1, High DPI scaling: inactive
      # 0 "HDMI-2" Depth: 32 Primary: yes
        Manufacturer: HPN
        Model: HP V22
        Serial number: 
        Geometry: 1920x1080+0+0 Available: 1920x1080+0+0
        Physical size: 480x270 mm  Refresh: 60 Hz Power state: 0
        Physical DPI: 101.6,101.6 Logical DPI: 96,96 Subpixel_None
        DevicePixelRatio: 1
        Primary orientation: 2 Orientation: 2 Native orientation: 0
      
      Input devices: 1
        QInputDevice::DeviceType::TouchPad "touchpad", capabilities: Position
      
      
      LibGL Vendor: Intel
      Renderer: Mesa Intel(R) HD Graphics (BYT)
      Version: 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
      Shading language: 4.20
      Format: Version: 4.2 Profile: 2 Swap behavior: 0 Buffer size (RGBA): 8,8,8,8
      Profile: None (QOpenGLFunctions_4_2), Core (QOpenGLFunctions_4_2_Core), Compatibility (QOpenGLFunctions_4_2_Compatibility)
      
      Vulkan instance available
      Supported instance extensions:
        VK_KHR_device_group_creation, version 1
        VK_KHR_display, version 23
        VK_KHR_external_fence_capabilities, version 1
        VK_KHR_external_memory_capabilities, version 1
        VK_KHR_external_semaphore_capabilities, version 1
        VK_KHR_get_display_properties2, version 1
        VK_KHR_get_physical_device_properties2, version 2
        VK_KHR_get_surface_capabilities2, version 1
        VK_KHR_surface, version 25
        VK_KHR_surface_protected_capabilities, version 1
        VK_KHR_wayland_surface, version 6
        VK_KHR_xcb_surface, version 6
        VK_KHR_xlib_surface, version 6
        VK_EXT_acquire_drm_display, version 1
        VK_EXT_acquire_xlib_display, version 1
        VK_EXT_debug_report, version 10
        VK_EXT_debug_utils, version 2
        VK_EXT_direct_mode_display, version 1
        VK_EXT_display_surface_counter, version 1
        VK_EXT_swapchain_colorspace, version 4
      Supported layers:
        VK_LAYER_MESA_device_select, version 1, spec version 1.3.211, Linux device selection layer
        VK_LAYER_INTEL_nullhw, version 1, spec version 1.1.73, INTEL NULL HW
        VK_LAYER_MESA_overlay, version 1, spec version 1.3.211, Mesa Overlay layer
      Available physical devices:
        API version 1.2.238, vendor 0x8086, device 0xF31, Intel(R) HD Graphics (BYT), type 1, driver version 23.0.4  API version 1.3.238, vendor 0x10005, device 0x0, llvmpipe (LLVM 15.0.7, 128 bits), type 4, driver version 0.0.1
      
      Qt Rendering Hardware Interface supported backends:
      OpenGL (with default QSurfaceFormat):
        Driver Info: Device: Intel Mesa Intel(R) HD Graphics (BYT) 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1 Device ID: 0x0 Vendor ID: 0x0 Device type: Unknown
        Min Texture Size: 1
        Max Texture Size: 16384
        Max Color Attachments: 8
        Frames in Flight: 1
        Async Readback Limit: 1
        MaxThreadGroupsPerDimension: 0
        MaxThreadsPerThreadGroup: 0
        MaxThreadGroupX: 0
        MaxThreadGroupY: 0
        MaxThreadGroupZ: 0
        TextureArraySizeMax: 2048
        MaxUniformBufferRange: 65536
        Uniform Buffer Alignment: 1
        Supported MSAA sample counts: 1,2,4,8
        Features:
          v MultisampleTexture
          v MultisampleRenderBuffer
          - DebugMarkers
          - Timestamps
          v Instancing
          - CustomInstanceStepRate
          - PrimitiveRestart
          v NonDynamicUniformBuffers
          v NonFourAlignedEffectiveIndexBufferOffset
          v NPOTTextureRepeat
          - RedOrAlpha8IsRed
          v ElementIndexUint
          - Compute
          v WideLines
          v VertexShaderPointSize
          v BaseVertex
          - BaseInstance
          v TriangleFanTopology
          v ReadBackNonUniformBuffer
          v ReadBackNonBaseMipLevel
          v TexelFetch
          v RenderToNonBaseMipLevel
          v IntAttributes
          v ScreenSpaceDerivatives
          - ReadBackAnyTextureFormat
          v PipelineCacheDataLoadSave
          v ImageDataStride
          v RenderBufferImport
          v ThreeDimensionalTextures
          v RenderTo3DTextureSlice
          v TextureArrays
        Texture formats: RGBA8 BGRA8 R8 R16 RG8 RED_OR_ALPHA8 RGBA16F RGBA32F R16F R32F D16 D32F BC1 BC2 BC3 ETC2_RGB8 ETC2_RGB8A1 ETC2_RGBA8 ASTC_4x4 ASTC_5x4 ASTC_5x5 ASTC_6x5 ASTC_6x6 ASTC_8x5 ASTC_8x6 ASTC_8x8 ASTC_10x5 ASTC_10x8 ASTC_10x10 ASTC_12x10 ASTC_12x12
      Vulkan:
        Driver Info: Device: Intel(R) HD Graphics (BYT) Device ID: 0xF31 Vendor ID: 0x8086 Device type: Integrated
        Min Texture Size: 1
        Max Texture Size: 8192
        Max Color Attachments: 8
        Frames in Flight: 2
        Async Readback Limit: 2
        MaxThreadGroupsPerDimension: 65535
        MaxThreadsPerThreadGroup: 1024
        MaxThreadGroupX: 1024
        MaxThreadGroupY: 1024
        MaxThreadGroupZ: 1024
        TextureArraySizeMax: 2048
        MaxUniformBufferRange: 134217728
        Uniform Buffer Alignment: 64
        Supported MSAA sample counts: 1,4,8
        Features:
          v MultisampleTexture
          v MultisampleRenderBuffer
          - DebugMarkers
          v Timestamps
          v Instancing
          - CustomInstanceStepRate
          v PrimitiveRestart
          v NonDynamicUniformBuffers
          v NonFourAlignedEffectiveIndexBufferOffset
          v NPOTTextureRepeat
          v RedOrAlpha8IsRed
          v ElementIndexUint
          v Compute
          v WideLines
          v VertexShaderPointSize
          v BaseVertex
          v BaseInstance
          v TriangleFanTopology
          v ReadBackNonUniformBuffer
          v ReadBackNonBaseMipLevel
          v TexelFetch
          v RenderToNonBaseMipLevel
          v IntAttributes
          v ScreenSpaceDerivatives
          v ReadBackAnyTextureFormat
          v PipelineCacheDataLoadSave
          v ImageDataStride
          - RenderBufferImport
          v ThreeDimensionalTextures
          - RenderTo3DTextureSlice
          v TextureArrays
        Texture formats: RGBA8 BGRA8 R8 R16 RG8 RED_OR_ALPHA8 RGBA16F RGBA32F R16F R32F D16 D32F BC1 BC2 BC3 BC4 BC5 BC6H BC7 ETC2_RGB8 ETC2_RGB8A1 ETC2_RGBA8
      
      qt.tlsbackend.ossl: Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)
      MESA-INTEL: warning: Bay Trail Vulkan support is incomplete
      MESA-INTEL: warning: Bay Trail Vulkan support is incomplete
      
      Plugin information:
      
      + Android                           11.0.1
      + AutoTest                          11.0.1
        AutotoolsProjectManager           11.0.1
        Axivion                           11.0.1
        BareMetal                         11.0.1
      + Bazaar                            11.0.1
        Beautifier                        11.0.1
      + BinEditor                         11.0.1
      + Bookmarks                         11.0.1
        Boot2Qt                           11.0.1
      + CMakeProjectManager               11.0.1
      + CVS                               11.0.1
      + ClangCodeModel                    11.0.1
      + ClangFormat                       11.0.1
      + ClangTools                        11.0.1
      + ClassView                         11.0.1
        ClearCase                         11.0.1
        Coco                              11.0.1
      + CodePaster                        11.0.1
        CompilationDatabaseProjectManager 11.0.1
        Conan                             11.0.1
        Copilot                           11.0.1
      + Core                              11.0.1
      + CppEditor                         11.0.1
        Cppcheck                          11.0.1
      + CtfVisualizer                     11.0.1
      + Debugger                          11.0.1
      + Designer                          11.0.1
      + DiffEditor                        11.0.1
        Docker                            11.0.1
        EmacsKeys                         11.0.1
      + FakeVim                           11.0.1
        Fossil                            11.0.1
      + GLSLEditor                        11.0.1
      + GenericProjectManager             11.0.1
      + Git                               11.0.1
        GitLab                            11.0.1
        Haskell                           11.0.1
        HelloWorld                        11.0.1
      + Help                              11.0.1
      + ImageViewer                       11.0.1
      + IncrediBuild                      11.0.1
        Insight                           11.0.1
        Ios                               11.0.1
      + LanguageClient                    11.0.1
      + Macros                            11.0.1
      + Marketplace                       11.0.1
        McuSupport                        11.0.1
      + Mercurial                         11.0.1
        MesonProjectManager               11.0.1
      + ModelEditor                       11.0.1
        Nim                               11.0.1
      + PerfProfiler                      11.0.1
        Perforce                          11.0.1
      + ProjectExplorer                   11.0.1
      + Python                            11.0.1
      + QbsProjectManager                 11.0.1
      + QmakeProjectManager               11.0.1
        QmlDesigner                       11.0.1
      + QmlDesignerBase                   11.0.1
      + QmlJSEditor                       11.0.1
      + QmlJSTools                        11.0.1
      + QmlPreview                        11.0.1
      + QmlProfiler                       11.0.1
      + QmlProjectManager                 11.0.1
      + Qnx                               11.0.1
      + QtSupport                         11.0.1
      + RemoteLinux                       11.0.1
      + ResourceEditor                    11.0.1
        SafeRenderer                      11.0.1
      + ScxmlEditor                       11.0.1
        SerialTerminal                    11.0.1
        SilverSearcher                    11.0.1
        Squish                            11.0.1
        StudioWelcome                     11.0.1
      + Subversion                        11.0.1
      + Terminal                          11.0.1
      + TextEditor                        11.0.1
        Todo                              11.0.1
      + UpdateInfo                        11.0.1
      + UsageStatistic                    11.0.1
      + Valgrind                          11.0.1
        Vcpkg                             11.0.1
      + VcsBase                           11.0.1
      + WebAssembly                       11.0.1
      + Welcome                           11.0.1
      
      Used settingspath: ~/.config/QtProject
      
      Qt Creator 11.0.1
      Based on Qt 6.4.3 (GCC 10.3.1 20210422 (Red Hat 10.3.1-1), x86_64)
      From revision e35bfdb7d1
      Built on Aug  2 2023 08:54:43
      
      

      Would somebody kindly take a look at Qt usage of "bluez" and CORRECT this ?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ivan.solovev Ivan Solovev
            anner Anne Ranch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes